Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for sortIPs (0.24 sec)

  1. cmd/net.go

    	}
    
    	return ipList, err
    }
    
    // sortIPs - sort ips based on higher octets.
    // The logic to sort by last octet is implemented to
    // prefer CIDRs with higher octets, this in-turn skips the
    // localhost/loopback address to be not preferred as the
    // first ip on the list. Subsequently this list helps us print
    // a user friendly message with appropriate values.
    func sortIPs(ipList []string) []string {
    	if len(ipList) == 1 {
    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)
  2. cmd/net_test.go

    		{
    			ipList:       []string{"127.0.0.1", "10.0.0.1", "192.168.0.1"},
    			sortedIPList: []string{"10.0.0.1", "192.168.0.1", "127.0.0.1"},
    		},
    	}
    	for i, testCase := range testCases {
    		gotIPList := sortIPs(testCase.ipList)
    		if !reflect.DeepEqual(testCase.sortedIPList, gotIPList) {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.sortedIPList, gotIPList)
    		}
    	}
    }
    
    func TestMustGetLocalIP4(t *testing.T) {
    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)
  3. cmd/endpoint.go

    				u := &url.URL{
    					Scheme: endpoint.Scheme,
    					Host:   endpoint.Host,
    				}
    				return u.String()
    			}
    		}
    	}
    	host := globalMinioHost
    	if host == "" {
    		host = sortIPs(localIP4.ToSlice())[0]
    	}
    	return fmt.Sprintf("%s://%s", getURLScheme(globalIsTLS), net.JoinHostPort(host, globalMinioPort))
    }
    
    // LocalDisksPaths returns the disk paths of the local disks
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 34.1K bytes
    - Viewed (0)
  4. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/AbstractAcceptedApiChangesMaintenanceTask.kt

            val jsonString = apiChangesFile.get().asFile.readText()
            val json = Gson().fromJson(jsonString, AcceptedApiChanges::class.java)
            return json.acceptedApiChanges!!
        }
    
        /**
         * Sorts the given list of [AcceptedApiChange]s by type and member.
         * <p>
         * This sort ought to remain consistent with the sort used by the [EnrichedReportRenderer].
         */
        @Suppress("KDocUnresolvedReference")
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Tue Feb 07 20:38:43 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/TestEnumSetGenerator.java

        }
        return create(array);
      }
    
      protected abstract Set<AnEnum> create(AnEnum[] elements);
    
      @Override
      public AnEnum[] createArray(int length) {
        return new AnEnum[length];
      }
    
      /** Sorts the enums according to their natural ordering. */
      @Override
      public List<AnEnum> order(List<AnEnum> insertionOrder) {
        Collections.sort(insertionOrder);
        return insertionOrder;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/TestEnumMultisetGenerator.java

        }
        return create(array);
      }
    
      protected abstract Multiset<AnEnum> create(AnEnum[] elements);
    
      @Override
      public AnEnum[] createArray(int length) {
        return new AnEnum[length];
      }
    
      /** Sorts the enums according to their natural ordering. */
      @Override
      public List<AnEnum> order(List<AnEnum> insertionOrder) {
        Collections.sort(insertionOrder);
        return insertionOrder;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/UnsignedLongs.java

          return "UnsignedLongs.lexicographicalComparator()";
        }
      }
    
      /**
       * Sorts the array, treating its elements as unsigned 64-bit integers.
       *
       * @since 23.1
       */
      public static void sort(long[] array) {
        checkNotNull(array);
        sort(array, 0, array.length);
      }
    
      /**
       * Sorts the array between {@code fromIndex} inclusive and {@code toIndex} exclusive, treating its
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/UnsignedInts.java

          return "UnsignedInts.lexicographicalComparator()";
        }
      }
    
      /**
       * Sorts the array, treating its elements as unsigned 32-bit integers.
       *
       * @since 23.1
       */
      public static void sort(int[] array) {
        checkNotNull(array);
        sort(array, 0, array.length);
      }
    
      /**
       * Sorts the array between {@code fromIndex} inclusive and {@code toIndex} exclusive, treating its
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/SignedBytes.java

          return "SignedBytes.lexicographicalComparator()";
        }
      }
    
      /**
       * Sorts the elements of {@code array} in descending order.
       *
       * @since 23.1
       */
      public static void sortDescending(byte[] array) {
        checkNotNull(array);
        sortDescending(array, 0, array.length);
      }
    
      /**
       * Sorts the elements of {@code array} between {@code fromIndex} inclusive and {@code toIndex}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:09:25 GMT 2021
    - 7.5K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/TestIntegerSortedSetGenerator.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestIntegerSortedSetGenerator extends TestIntegerSetGenerator {
      @Override
      protected abstract SortedSet<Integer> create(Integer[] elements);
    
      /** Sorts the elements by their natural ordering. */
      @Override
      public List<Integer> order(List<Integer> insertionOrder) {
        Collections.sort(insertionOrder);
        return insertionOrder;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.3K bytes
    - Viewed (0)
Back to top