Skip to content

Commit

Permalink
chore: clarify log.SetFlags(0) rationale
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed Jun 17, 2024
1 parent eca53e4 commit b2b2461
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (
)

func main() {
// Since we use log.Fatal* functions to write to stderr and exit with a non-zero status code,
// we need to disable the default log prefix that includes the date and time, as it would
// be bubbled up to the message of the response returned to the caller.
log.SetFlags(0)

if len(os.Args) != 2 {
Expand Down

0 comments on commit b2b2461

Please sign in to comment.