chore: cleanup staticcheck errors

This commit is contained in:
Ben McClelland
2024-08-13 11:09:11 -07:00
parent a36d974942
commit 54490f55cc
3 changed files with 3 additions and 3 deletions

View File

@@ -654,7 +654,7 @@ func (s *S3Proxy) ChangeBucketOwner(ctx context.Context, bucket string, acl []by
return err
}
defer resp.Body.Close()
return fmt.Errorf(string(body))
return fmt.Errorf("%v", string(body))
}
return nil

View File

@@ -2801,7 +2801,7 @@ func (c S3ApiController) CreateActions(ctx *fiber.Ctx) error {
if ctx.Request().URI().QueryArgs().Has("restore") {
var restoreRequest types.RestoreRequest
if err := xml.Unmarshal(ctx.Body(), &restoreRequest); err != nil {
if !errors.Is(io.EOF, err) {
if !errors.Is(err, io.EOF) {
return SendResponse(ctx, s3err.GetAPIError(s3err.ErrMalformedXML),
&MetaOpts{
Logger: c.logger,

View File

@@ -613,7 +613,7 @@ func changeBucketsOwner(s *S3Conf, buckets []string, owner string) error {
return err
}
if !strings.Contains(string(out), "Bucket owner has been updated successfully") {
return fmt.Errorf(string(out))
return fmt.Errorf("%v", string(out))
}
}