}
func efsPathForId(efsId int) string {
- config := getConfig()
+ config := GetConfig()
idStr := fmt.Sprintf("%010d", efsId)
- path := fmt.Sprintf("%s/%s/%s/%s/%s/%s.dat", config.efsBasePath, idStr[0:2], idStr[2:4], idStr[4:6], idStr[6:8], idStr)
+ path := fmt.Sprintf("%s/efs/%s/%s/%s/%s/%s.dat", config.basePath, idStr[0:2], idStr[2:4], idStr[4:6], idStr[6:8], idStr)
return path
}
func handleSearch(w http.ResponseWriter, r *http.Request) {
var err error
- fmt.Println("DEBUG: handleSearch(): " + r.URL.Path)
fields := []Field{Author, Title, Series}
paramName := fv.String()
paramValues := r.Form[paramName]
for _, pv := range(paramValues) {
- fmt.Println("DEBUG: handleSearch(): ", paramName, "=", pv)
if count >= len(terms) {
fmt.Printf("WARNING: limit of %d search terms exceeded. One or more terms ignored.", len(terms))
break