Skip to content

Commit

Permalink
chore: add gosec annotation to avoid lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Aug 21, 2024
1 parent 95dbad1 commit 75a31d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/tally/types/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func NewFilterMode(input []byte) (FilterMode, error) {
}

path := input[9:]
if len(path) != int(pathLen) {
return filter, ErrInvalidPathLen.Wrapf("expected: %d got: %d", int(pathLen), len(path))
if len(path) != int(pathLen) { // #nosec G115
return filter, ErrInvalidPathLen.Wrapf("expected: %d got: %d", int(pathLen), len(path)) // #nosec G115
}
filter.dataPath = string(path)
return filter, nil
Expand Down Expand Up @@ -114,8 +114,8 @@ func NewFilterStdDev(input []byte) (FilterStdDev, error) {
}

path := input[18:]
if len(path) != int(pathLen) {
return filter, ErrInvalidPathLen.Wrapf("expected: %d got: %d", int(pathLen), len(path))
if len(path) != int(pathLen) { // #nosec G115
return filter, ErrInvalidPathLen.Wrapf("expected: %d got: %d", int(pathLen), len(path)) // #nosec G115
}
filter.dataPath = string(path)
return filter, nil
Expand Down

0 comments on commit 75a31d2

Please sign in to comment.