refactor: lint with golangci-lint
1 file changed, 3 insertions(+), 0 deletions(-)
changed files
M internal/website/mux.go → internal/website/mux.go
@@ -25,6 +25,7 @@ cPath, differs = strings.CutSuffix(path, "index.html") } else if !strings.HasSuffix(path, "/") && files[path+"/"] != (File{}) { cPath, differs = path+"/", true } + return cPath, differs }@@ -62,6 +63,7 @@ mux.Handle("/", webHandler(func(w http.ResponseWriter, r *http.Request) *HTTPError { urlPath, shouldRedirect := canonicalisePath(r.URL.Path) if shouldRedirect { http.Redirect(w, r, urlPath, 302) + return nil } file := GetFile(urlPath)@@ -79,6 +81,7 @@ w.Header().Add(k, v) } http.ServeFile(w, r, files[urlPath].filename) + return nil }))