Skip to content

Commit

Permalink
fix: gosec ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Oct 9, 2024
1 parent a016078 commit 1f8b6bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1352,9 +1352,8 @@ func (m *messageIO) WriteMessage(w io.Writer, message *iso8583.Message) error {
if len(rawMessage) > math.MaxUint16 {
return fmt.Errorf("message length is out of uint16 range: %d", len(rawMessage))
}
//nolint:gosec // disable G115 as it's a false positive
h := header{
Length: uint16(len(rawMessage)),
Length: uint16(len(rawMessage)), //nolint:gosec // disable G115 as it's a false positive
}

// write header
Expand Down
3 changes: 1 addition & 2 deletions pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ func TestPool(t *testing.T) {
// Then pool builds and connects connections to all servers
require.Eventually(t, func() bool {
// we expect connectionsCnt counter to be incremented by both servers
//nolint:gosec // disable G115
return atomic.LoadInt32(&connectionsCnt) == int32(serversToStart)
return atomic.LoadInt32(&connectionsCnt) == int32(serversToStart) //nolint:gosec // disable G115 as it's a false positive
}, 500*time.Millisecond, 50*time.Millisecond, "%d expected connections established, but got %d", serversToStart, atomic.LoadInt32(&connectionsCnt))

// And pool has serversCnt connections
Expand Down

0 comments on commit 1f8b6bc

Please sign in to comment.