From 3093c4cffa82211fd8ab3a141e54fcf9c10a8012 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 30 Jan 2022 13:56:41 +0000 Subject: Move response template to resp.html --- resp.go | 11 +++++++---- resp.html | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 resp.html diff --git a/resp.go b/resp.go index 408dcd3..2bbe434 100644 --- a/resp.go +++ b/resp.go @@ -4,6 +4,7 @@ package main import ( + _ "embed" "log" "net/http" "path" @@ -11,10 +12,12 @@ import ( "text/template" ) -var body = template.Must(template.New("").Parse(` - -go-import-redirect -`)) +var ( + body = template.Must(template.New("").Parse(tmpl)) + + //go:embed resp.html + tmpl string +) type bodyData struct{ Package, Repository, VCS string } diff --git a/resp.html b/resp.html new file mode 100644 index 0000000..422024a --- /dev/null +++ b/resp.html @@ -0,0 +1,3 @@ + + +go-import-redirect -- cgit v1.2.3-70-g09d2