Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CopyStrings (0.11 sec)

  1. pkg/util/slice/slice_test.go

    	var src1 []string
    	dest1 := CopyStrings(src1)
    
    	if !reflect.DeepEqual(src1, dest1) {
    		t.Errorf("%v and %v are not equal", src1, dest1)
    	}
    
    	src2 := []string{}
    	dest2 := CopyStrings(src2)
    
    	if !reflect.DeepEqual(src2, dest2) {
    		t.Errorf("%v and %v are not equal", src2, dest2)
    	}
    
    	src3 := []string{"a", "c", "b"}
    	dest3 := CopyStrings(src3)
    
    	if !reflect.DeepEqual(src3, dest3) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 30 07:21:37 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  2. pkg/util/slice/slice.go

    limitations under the License.
    */
    
    // Package slice provides utility methods for common operations on slices.
    package slice
    
    import (
    	"sort"
    )
    
    // CopyStrings copies the contents of the specified string slice
    // into a new slice.
    func CopyStrings(s []string) []string {
    	if s == nil {
    		return nil
    	}
    	c := make([]string, len(s))
    	copy(c, s)
    	return c
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 21 19:03:53 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/framework.go

    		// - part 3: other plugins (excluded by part 1 & 2) in regular extension point.
    		newPlugins := reflect.New(reflect.TypeOf(e.slicePtr).Elem()).Elem()
    		// part 1
    		for _, name := range slice.CopyStrings(enabledSet.list) {
    			if overridePlugins.has(name) {
    				newPlugins = reflect.Append(newPlugins, reflect.ValueOf(f.pluginsMap[name]))
    				enabledSet.delete(name)
    			}
    		}
    		// part 2
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
Back to top