all repos — elgit @ 57b38c18e8257fd518b305669d350fdb9dee5703

fork of legit: web frontend for git, written in go

fix linter complaints

Alan Pearce
commit

57b38c18e8257fd518b305669d350fdb9dee5703

parent

198873c58a72e4798289f4ff8a41d8a124625f00

1 file changed, 9 insertions(+), 1 deletion(-)

changed files
M routes/handler.goroutes/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 }