all repos — elgit @ a87f88a57c68627a1f63f1551fcef2c1f1ec7036

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

routes: add raw file view

commit

a87f88a57c68627a1f63f1551fcef2c1f1ec7036

parent

bdfc973207a67a3b217c130520d53373d088763c

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

changed files
M routes/template.goroutes/template.go
@@ -95,3 +95,10 @@ log.Println(err)
return } } + +func (d *deps) showRaw(content string, w http.ResponseWriter) { + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "text/plain") + w.Write([]byte(content)) + return +}