Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus committed Apr 22, 2024
1 parent e484e80 commit aa7eddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/nftables/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ func (c *nftContext) collectActiveBannedIPs() (int, error) {
set, err := c.conn.GetSetByName(c.table, c.set.Name)

if err != nil {
return 0, fmt.Errorf("can't get set %s: %s", c.set.Name, err)
return 0, fmt.Errorf("can't get set %s: %w", c.set.Name, err)
}

setContent, err := c.conn.GetSetElements(set)

if err != nil {
return 0, fmt.Errorf("can't get set elements for %s: %s", c.set.Name, err)
return 0, fmt.Errorf("can't get set elements for %s: %w", c.set.Name, err)
}

return len(setContent), nil
Expand Down

0 comments on commit aa7eddd

Please sign in to comment.