Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for nonIPs (0.16 sec)

  1. cmd/net.go

    func sortIPs(ipList []string) []string {
    	if len(ipList) == 1 {
    		return ipList
    	}
    
    	var ipV4s []net.IP
    	var nonIPs []string
    	for _, ip := range ipList {
    		nip := net.ParseIP(ip)
    		if nip != nil {
    			ipV4s = append(ipV4s, nip)
    		} else {
    			nonIPs = append(nonIPs, ip)
    		}
    	}
    
    	sort.Slice(ipV4s, func(i, j int) bool {
    		// This case is needed when all ips in the list
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top