Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ApplyFunc (0.5 sec)

  1. cmd/net.go

    	hostIPs, err := getHostIP(host)
    	if err != nil {
    		return false, err
    	}
    
    	nonInterIPV4s := mustGetLocalIP4().Intersection(hostIPs)
    	if nonInterIPV4s.IsEmpty() {
    		hostIPs = hostIPs.ApplyFunc(func(ip string) string {
    			if net.ParseIP(ip).IsLoopback() {
    				// Any loopback IP which is not 127.0.0.1
    				// convert it to check for intersections.
    				return "127.0.0.1"
    			}
    			return ip
    		})
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Wed Jun 19 14:34:00 UTC 2024
    - 9.6K bytes
    - Viewed (1)
Back to top