Skip to content

Commit

Permalink
sort cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sa7mon committed Dec 29, 2024
1 parent 40cac93 commit 6188d13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions provider/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ func bucketExists301(client *s3.Client, region string, b *bucket.Bucket) (bool,
}

switch res.StatusCode {
case 301:
return true, res.Header.Get("x-amz-bucket-region"), nil
case 404:
return false, "", nil
case 200:
return true, region, nil
case 301:
return true, res.Header.Get("x-amz-bucket-region"), nil
case 403:
return true, region, nil
case 404:
return false, "", nil
}
return false, "", logErr(logFields, errors.New(fmt.Sprintf("unexpected status code: %d", res.StatusCode)))

Check failure on line 316 in provider/providers.go

View workflow job for this annotation

GitHub Actions / lint

errorf: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (revive)
}
Expand Down

0 comments on commit 6188d13

Please sign in to comment.