Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ConstantFormats (0.14 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/library/format.go

    	options := make([]cel.EnvOption, 0, len(formatLibraryDecls))
    	for name, overloads := range formatLibraryDecls {
    		options = append(options, cel.Function(name, overloads...))
    	}
    	for name, constantValue := range ConstantFormats {
    		prefixedName := "format." + name
    		options = append(options, cel.Function(prefixedName, cel.Overload(prefixedName, []*cel.Type{}, apiservercel.FormatType, ZeroArgumentFunctionBinding(func() ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/library/format_test.go

    			})),
    		},
    	}
    
    	// Also test format names and comparisons of all constants
    	for keyLHS := range library.ConstantFormats {
    		cases = append(cases, testcase{
    			name:        "lookup and comparison",
    			expr:        fmt.Sprintf(`format.named("%s").hasValue()`, keyLHS),
    			expectValue: types.True,
    		}, testcase{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 9.2K bytes
    - Viewed (0)
Back to top