Skip to content

Commit

Permalink
fixup! Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed May 1, 2024
1 parent 6ddc368 commit d687f3d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/connUDP_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,21 +284,21 @@ func TestControlMessageString(t *testing.T) {
func getIfaceAddr(t *testing.T, iface net.Interface, ipv4 bool) net.IP {
addrs, err := iface.Addrs()
require.NoError(t, err)
var ipOut net.IP
for _, addr := range addrs {
ip, _, err := net.ParseCIDR(addr.String())
require.NoError(t, err)
if !ip.IsPrivate() {
continue
}
if ipv4 {
if ip.To4() != nil {
return ip
}
if ipv4 && ip.To4() == nil {
continue
}
return ip
ipOut = ip
break
}
return nil
require.NotEmpty(t, ipOut)
return ipOut
}

func TestUDPConnWriteToAddr(t *testing.T) {
Expand Down

0 comments on commit d687f3d

Please sign in to comment.