Address a bunch of golint warnings.

This commit is contained in:
Ward Vandewege 2021-04-24 11:26:50 -04:00
parent d30b682a6e
commit f7b6c68d22
7 changed files with 13 additions and 3 deletions

2
app.go
View file

@ -114,10 +114,10 @@ func (h *Headscale) Serve() error {
go func() {
log.Fatal(http.ListenAndServe(":http", m.HTTPHandler(http.HandlerFunc(h.redirect))))
}()
err = s.ListenAndServeTLS("", "")
} else {
return errors.New("Unknown value for TLSLetsEncryptChallengeType")
}
err = s.ListenAndServeTLS("", "")
} else if h.cfg.TLSCertPath == "" {
if !strings.HasPrefix(h.cfg.ServerURL, "http://") {
fmt.Println("WARNING: listening without TLS but ServerURL does not start with http://")