Skip to content

Commit

Permalink
fixup: lint suggests strings.Contains
Browse files Browse the repository at this point in the history
  • Loading branch information
matzf committed Jun 27, 2023
1 parent 4aa29eb commit 0e97b8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/addr/addr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func TestParseAddrPort(t *testing.T) {
assert.Equal(t, expected.Port, port)

fmted := addr.FormatAddrPort(a, port)
if strings.Index(s, "]:0") < 0 { // skip cases where port has leading 0s
if !strings.Contains(s, "]:0") { // skip cases where port has leading 0s
assert.Equal(t, s, fmted)
}
})
Expand Down

0 comments on commit 0e97b8c

Please sign in to comment.