1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

server: resolve linter errors (#433)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-11-13 11:34:05 -08:00
committed by GitHub
parent e22ed26633
commit 535438342e
5 changed files with 15 additions and 20 deletions

View File

@@ -159,11 +159,9 @@ func (s *Server) Start(ctx context.Context, readyFunc func()) {
readyFunc()
// Wait for shutdown
select {
case _ = <-ctx.Done():
log.Debug().Str("module", "web").Str("phase", "shutdown").
Msg("HTTP server shutting down on request")
}
<-ctx.Done()
log.Debug().Str("module", "web").Str("phase", "shutdown").
Msg("HTTP server shutting down on request")
// Closing the listener will cause the serve() go routine to exit
if err := listener.Close(); err != nil {
@@ -195,7 +193,7 @@ func (s *Server) serve(ctx context.Context) {
err := server.Serve(listener)
select {
case _ = <-ctx.Done():
case <-ctx.Done():
// Nop
default:
log.Error().Str("module", "web").Str("phase", "startup").Err(err).