Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MapValue (0.09 sec)

  1. src/internal/fmtsort/sort.go

    func Sort(mapValue reflect.Value) SortedMap {
    	if mapValue.Type().Kind() != reflect.Map {
    		return nil
    	}
    	// Note: this code is arranged to not panic even in the presence
    	// of a concurrent map update. The runtime is responsible for
    	// yelling loudly if that happens. See issue 33275.
    	n := mapValue.Len()
    	sorted := make(SortedMap, 0, n)
    	iter := mapValue.MapRange()
    	for iter.Next() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy_test.go

    	activation := &testActivation{variables: variablesMap}
    
    	// add foo as a string
    	variablesType.Fields["foo"] = apiservercel.NewDeclField("foo", apiservercel.StringType, true, nil, nil)
    	variablesMap.Append("foo", func(_ *MapValue) ref.Val {
    		return types.String("foo-string")
    	})
    
    	exp := "variables.foo == 'foo-string'"
    	v, err := compileAndRun(env, activation, exp)
    	if err != nil {
    		t.Fatalf("%q: %v", exp, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top