Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
martelskiy committed Sep 11, 2023
1 parent 898c356 commit b46d215
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions cmd/api-template-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ func main() {
log.Infof("web host is running at port: '%s'", configuration.Api.Port)

lifecycle.ListenForApplicationShutDown(func() {
defer logger.Dispose()
log.Info("terminating the web host")
host.Terminate(context)
if err := host.Terminate(context); err != nil {
log.Error("error terminating the host: '%v'", err)
}

log.Info("disposing logger")
logger.Dispose()
}, make(chan os.Signal, 1))
}
2 changes: 1 addition & 1 deletion internal/healthcheck/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ import (
func GetStatus(responseWriter http.ResponseWriter, request *http.Request) {
responseWriter.WriteHeader(http.StatusOK)
statusResponse := "healthy"
responseWriter.Write([]byte(statusResponse))
_, _ = responseWriter.Write([]byte(statusResponse))
}

0 comments on commit b46d215

Please sign in to comment.