Skip to content

Commit

Permalink
feat: address lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss committed Aug 22, 2023
1 parent 6cac8fd commit 7e447c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions cmd/poller/plugin/changelog/change_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ func (c *ChangeLog) Init() error {
return err
}

// Populate the ChangeLog configuration
if err := c.populateChangeLogConfig(); err != nil {
return err
}

return nil
return c.populateChangeLogConfig()
}

// populateChangeLogConfig populates the ChangeLog configuration from the plugin parameters
Expand Down
4 changes: 2 additions & 2 deletions pkg/dict/dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package dict

import (
"github.com/netapp/harvest/v2/pkg/util"
"reflect"
"slices"
"strings"
)

Expand Down Expand Up @@ -129,7 +129,7 @@ func (d *Dict) CompareLabels(prev *Dict, labels []string) (*Dict, *Dict) {
old := New()
for key, val1 := range d.dict {
val2, ok := prev.dict[key]
if util.Contains(labels, key) && (!ok || !reflect.DeepEqual(val1, val2)) {
if slices.Contains(labels, key) && (!ok || !reflect.DeepEqual(val1, val2)) {
cur.dict[key] = val1
old.dict[key] = val2
}
Expand Down

0 comments on commit 7e447c8

Please sign in to comment.