mirror of
https://github.com/versity/versitygw.git
synced 2026-01-03 10:35:15 +00:00
chore: cleanup staticcheck errors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user