all repos — homestead @ 8abf706d2e9d70a3d11f58a9eb4c01a7e6b436c2

Code for my website

refactor: lint with golangci-lint

Alan Pearce
commit

8abf706d2e9d70a3d11f58a9eb4c01a7e6b436c2

parent

728423eaeb39d3db2fdab31f65a3dc503542762d

1 file changed, 3 insertions(+), 0 deletions(-)

changed files
M internal/website/mux.gointernal/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 }))