fix linter complaints
1 file changed, 9 insertions(+), 1 deletion(-)
changed files
M routes/handler.go → routes/handler.go
@@ -1,6 +1,7 @@ package routes import ( + "log" "net/http" "go.alanpearce.eu/elgit/config"@@ -13,7 +14,14 @@ path := r.PathValue("rest") if r.URL.RawQuery == "service=git-receive-pack" { w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("no pushing allowed!")) + _, err := w.Write([]byte("no pushing allowed!")) + if err != nil { + log.Println(err) + d.Write500(w) + + return + } + return }