Skip to content

Commit

Permalink
Fix "redefines-builtin-id" linting error:
Browse files Browse the repository at this point in the history
```
redefines-builtin-id: redefinition of the built-in function new
```

This is basically shadowing a built in method, which is a bad practice.

Signed-off-by: Brendan Winter <bwinter@vmware.com>
  • Loading branch information
bwinter committed Jun 2, 2023
1 parent 4663c96 commit 815aad9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wavefront/resource_role.go
Expand Up @@ -50,12 +50,12 @@ func getAssignees(d *schema.ResourceData) ([]string, []string) {
}

func getChangedLists(d *schema.ResourceData, key string) ([]string, []string) {
old, new := d.GetChange(key)
oldC, newC := d.GetChange(key)
var oldP, newP []string
for _, o := range old.(*schema.Set).List() {
for _, o := range oldC.(*schema.Set).List() {
oldP = append(oldP, fmt.Sprint(o))
}
for _, n := range new.(*schema.Set).List() {
for _, n := range newC.(*schema.Set).List() {
newP = append(newP, fmt.Sprint(n))
}

Expand Down

0 comments on commit 815aad9

Please sign in to comment.