We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be863d5 commit a27c139Copy full SHA for a27c139
ip/ip_test.go
@@ -25,6 +25,7 @@ func TestIsAbroadIp(t *testing.T) {
25
wd, _ := os.Getwd()
26
if filepath.Base(wd) == "ip" {
27
os.Chdir("..")
28
+ defer os.Chdir(wd)
29
}
30
31
// Initialize the IP database
util/network.go
@@ -45,5 +45,8 @@ func IsIntranetIp(ip string) bool {
45
return false
46
47
48
- return parsedIP.IsPrivate() || parsedIP.IsLoopback() || parsedIP.IsLinkLocalUnicast() || parsedIP.IsLinkLocalMulticast()
+ return parsedIP.IsPrivate() ||
49
+ parsedIP.IsLoopback() ||
50
+ parsedIP.IsLinkLocalUnicast() ||
51
+ parsedIP.IsLinkLocalMulticast()
52
0 commit comments