mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-25 17:25:36 +03:00
linting
This commit is contained in:
parent
19aa8c76ff
commit
433d83d5b2
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user