- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for mustGetLocalIP4 (0.21 sec)
-
cmd/net.go
case *net.IPNet: ip = v.IP case *net.IPAddr: ip = v.IP } ipList = append(ipList, ip) } } return ipList } // mustGetLocalIP4 returns IPv4 addresses of localhost. It panics on error. func mustGetLocalIP4() (ipList set.StringSet) { ipList = set.NewStringSet() for _, ip := range mustGetLocalIPs() { if ip.To4() != nil { ipList.Add(ip.String()) } } return }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Mar 26 15:00:38 GMT 2024 - 9.3K bytes - Viewed (0) -
cmd/net_test.go
func TestMustGetLocalIP4(t *testing.T) { testCases := []struct { expectedIPList set.StringSet }{ {set.CreateStringSet("127.0.0.1")}, } for _, testCase := range testCases { ipList := mustGetLocalIP4() if testCase.expectedIPList != nil && testCase.expectedIPList.Intersection(ipList).IsEmpty() { t.Fatalf("host: expected = %v, got = %v", testCase.expectedIPList, ipList) } } }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Apr 19 08:43:09 GMT 2024 - 9.3K bytes - Viewed (0) -
cmd/common-main.go
} domainIPs.Add(endpoint) } updateDomainIPs(domainIPs) } else { // Add found interfaces IP address to global domain IPS, // loopback addresses will be naturally dropped. domainIPs := mustGetLocalIP4() for _, host := range globalEndpoints.Hostnames() { domainIPs.Add(host) } updateDomainIPs(domainIPs) } // In place update is true by default if the MINIO_UPDATE is not set
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Apr 17 00:34:45 GMT 2024 - 35.5K bytes - Viewed (2)