diff --git a/cli/cli.go b/cli/cli.go index 584a3631..bf68fce5 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -585,7 +585,7 @@ func newWriters(log lg.Log, cmd *cobra.Command, defaults config.Defaults, out, e // via config or flag. format := getFormat(cmd, defaults) - switch format { //nolint:exhaustive + switch format { default: // No format specified, use JSON w.recordw = jsonw.NewStdRecordWriter(out2, fm) diff --git a/cli/cmd_version.go b/cli/cmd_version.go index 2b039963..5f898cc1 100644 --- a/cli/cmd_version.go +++ b/cli/cmd_version.go @@ -67,7 +67,7 @@ func execVersion(cmd *cobra.Command, args []string) error { func fetchBrewVersion(ctx context.Context) (string, error) { const u = `https://raw.githubusercontent.com/neilotoole/homebrew-sq/master/sq.rb` - req, err := http.NewRequestWithContext(ctx, "GET", u, http.NoBody) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, u, http.NoBody) if err != nil { return "", errz.Err(err) } @@ -79,10 +79,8 @@ func fetchBrewVersion(ctx context.Context) (string, error) { defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - if err != nil { - return "", errz.Errorf("failed to check edgectl brew repo: %d %s", - resp.StatusCode, http.StatusText(resp.StatusCode)) - } + return "", errz.Errorf("failed to check edgectl brew repo: %d %s", + resp.StatusCode, http.StatusText(resp.StatusCode)) } body, err := io.ReadAll(resp.Body)