Skip to content

Commit

Permalink
Fix Variable 'server' collides with imported package name
Browse files Browse the repository at this point in the history
  • Loading branch information
boekkooi-lengoo committed Oct 2, 2021
1 parent d13bac2 commit 9634274
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/yopass-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ func main() {
// listenAndServe starts a HTTP server on the given addr. It uses TLS if both
// certFile and keyFile are not empty.
func listenAndServe(addr string, h http.Handler, certFile, keyFile string) error {
server := &http.Server{
srv := &http.Server{
Addr: addr,
Handler: h,
TLSConfig: &tls.Config{MinVersion: tls.VersionTLS12},
}
if certFile == "" || keyFile == "" {
return server.ListenAndServe()
return srv.ListenAndServe()
}
return server.ListenAndServeTLS(certFile, keyFile)
return srv.ListenAndServeTLS(certFile, keyFile)
}

// metricsHandler builds a handler to serve Prometheus metrics
Expand Down

0 comments on commit 9634274

Please sign in to comment.