mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-01 06:40:45 +02:00
fix compilation error on go tip
This commit is contained in:
parent
eaf000eff1
commit
17918f0b82
|
@ -75,7 +75,7 @@ func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func debug(params ...interface{}) {
|
func debug(params ...interface{}) {
|
||||||
glog.V(4).Infoln(params)
|
glog.V(4).Infoln(params...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) {
|
func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
|
||||||
entries, err := fs.filer.ListDirectoryEntries(filer2.FullPath(path), lastFileName, false, limit)
|
entries, err := fs.filer.ListDirectoryEntries(filer2.FullPath(path), lastFileName, false, limit)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(0).Infof("listDirectory %s %s $d: %s", path, lastFileName, limit, err)
|
glog.V(0).Infof("listDirectory %s %s %d: %s", path, lastFileName, limit, err)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ func (fs *FilerServer) monolithicUploadAnalyzer(w http.ResponseWriter, r *http.R
|
||||||
*/
|
*/
|
||||||
lastPos := strings.LastIndex(r.URL.Path, "/")
|
lastPos := strings.LastIndex(r.URL.Path, "/")
|
||||||
if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 {
|
if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 {
|
||||||
glog.V(0).Infoln("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path)
|
glog.V(0).Infof("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path)
|
||||||
err = fmt.Errorf("URL Path is invalid")
|
err = fmt.Errorf("URL Path is invalid")
|
||||||
writeJsonError(w, r, http.StatusInternalServerError, err)
|
writeJsonError(w, r, http.StatusInternalServerError, err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue