From 4f8f13fd76f065e49efdb3aa1a7504ffcafbf9a8 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Wed, 19 May 2021 00:49:33 +0200 Subject: Allow setting branch (#46) Support specifying the branch from which source will be served in the YAML configuration. --- handler.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'handler.go') diff --git a/handler.go b/handler.go index 2f32132..a29f399 100644 --- a/handler.go +++ b/handler.go @@ -55,10 +55,12 @@ func (h packageHandler) Handle(w http.ResponseWriter, r *http.Request, ps httpro canonicalURL := fmt.Sprintf("%s/%s", h.config.URL, h.pkgName) data := struct { Repo string + Branch string CanonicalURL string GodocURL string }{ Repo: h.pkg.Repo, + Branch: h.pkg.Branch, CanonicalURL: canonicalURL, GodocURL: fmt.Sprintf("https://%s/%s%s", h.config.Godoc.Host, canonicalURL, ps.ByName("path")), } -- cgit v1.2.3