From 5b7f069f0652bd4c5164a47873e04a50896a0cbf Mon Sep 17 00:00:00 2001 From: Jaime Pillora Date: Wed, 7 Oct 2020 21:42:49 +1100 Subject: [PATCH] godoc, remove log --- handler/config.go | 2 ++ handler/handler.go | 1 + handler/handler_github.go | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handler/config.go b/handler/config.go index 38685da..406329d 100644 --- a/handler/config.go +++ b/handler/config.go @@ -1,11 +1,13 @@ package handler +//Config installer handler type Config struct { Port int `opts:"help=port, env"` User string `opts:"help=default user when not provided in URL, env"` Token string `opts:"help=github api token, env=GH_TOKEN"` } +//DefaultConfig for an installer handler var DefaultConfig = Config{ Port: 3000, User: "jpillora", diff --git a/handler/handler.go b/handler/handler.go index dcc69b4..02dcc3b 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -50,6 +50,7 @@ func (q query) cacheKey() string { return base64.StdEncoding.EncodeToString(h.Sum(nil)) } +//Handler serves install scripts using Github releases type Handler struct { Config cacheMut sync.Mutex diff --git a/handler/handler_github.go b/handler/handler_github.go index cabe8cd..5afb490 100644 --- a/handler/handler_github.go +++ b/handler/handler_github.go @@ -49,7 +49,6 @@ func (h *Handler) getAssets(q *query) error { h.cacheMut.Lock() h.cache[key] = q h.cacheMut.Unlock() - log.Printf("cached '%s' = %#v", key, q) return nil }