Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel committed Nov 14, 2023
1 parent 6667d0b commit 1b32ba0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gosmee/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ accessible endpoint and forward request to your local service`,
Action: func(c *cli.Context) error {
nocolor := c.Bool("nocolor")
w := os.Stdout
logger := slog.New(tint.NewHandler(w, &tint.Options{
TimeFormat: time.RFC1123,
NoColor: !isatty.IsTerminal(w.Fd()),
}))
logger := &slog.Logger{}

Check failure on line 90 in gosmee/app.go

View workflow job for this annotation

GitHub Actions / Lint

ineffectual assignment to logger (ineffassign)
switch c.String("output") {
case "json":
logger = slog.New(slog.NewJSONHandler(os.Stdout, nil))
nocolor = true
case "pretty":
logger = logger
logger = slog.New(tint.NewHandler(w, &tint.Options{
TimeFormat: time.RFC1123,
NoColor: !isatty.IsTerminal(w.Fd()),
}))
default:
return fmt.Errorf("invalid output format %s", c.String("output"))
}
Expand Down

0 comments on commit 1b32ba0

Please sign in to comment.