From c58b44c4fc69a3602d751d679c69c07e6bcbe24a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 14 May 2017 02:44:20 -0700 Subject: Make golint fail if lint errors are found, and fix said lint. --- .travis.yml | 2 +- acme.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index afacec5..9e5c641 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ script: - go build . - go test . - go vet . -- golint . +- golint -set_exit_status . jobs: include: diff --git a/acme.go b/acme.go index 5ec4ca8..ab8d59a 100644 --- a/acme.go +++ b/acme.go @@ -26,12 +26,14 @@ type acmeCacheEntry struct { expires time.Time } +// ACME locates backends that are attempting ACME SNI-based validation. type ACME struct { backends []string // *.acme.invalid domain to cache entry cache map[string]acmeCacheEntry } +// Match returns the backend for hostname, if one is found. func (s *ACME) Match(hostname string) string { c := s.cache[hostname] if time.Now().Before(c.expires) { -- cgit v1.2.3