Skip to content

Commit

Permalink
Test_getIPFamily: fix subtest not capturing variable
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jan 12, 2023
1 parent 8d8edb1 commit 7ec5809
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netlink_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package ipvs
Expand Down Expand Up @@ -37,6 +38,7 @@ func Test_getIPFamily(t *testing.T) {
}

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
family, err := getIPFamily(testcase.address)
if !reflect.DeepEqual(err, testcase.expectedErr) {
Expand Down

0 comments on commit 7ec5809

Please sign in to comment.