Skip to content

Commit

Permalink
Handle errors, to solve errors pointed by gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
felladrin committed Jul 11, 2023
1 parent 644e20b commit 9d8e0ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions minio/resource_minio_iam_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,8 @@ func minioReadGroup(ctx context.Context, d *schema.ResourceData, meta interface{
return NewResourceError("error reading IAM Group %s: %s", d.Id(), err)
}

if output.Status == string(madmin.GroupDisabled) {
d.Set("disable_group", true)
} else {
d.Set("disable_group", false)

if err := d.Set("disable_group", output.Status == string(madmin.GroupDisabled)); err != nil {
return NewResourceError("error reading IAM Group %s: %s", d.Id(), err)
}

return nil
Expand Down

0 comments on commit 9d8e0ce

Please sign in to comment.