Skip to content

Commit

Permalink
Improve error logging (#97)
Browse files Browse the repository at this point in the history
Eliminate logging of naked `error` values.

Signed-off-by: SuperQ <superq@gmail.com>
  • Loading branch information
SuperQ authored Oct 11, 2024
1 parent 8a7dc80 commit 3ea2eac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ linters:
enable:
- misspell
- revive
- sloglint

linters-settings:
errcheck:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func main() {
}
landingPage, err := web.NewLandingPage(landingConfig)
if err != nil {
logger.Error(err.Error())
logger.Error("error creating landing page", "err", err)
os.Exit(1)
}
http.Handle("/", landingPage)
Expand Down

0 comments on commit 3ea2eac

Please sign in to comment.