Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 64 for NewMatcher (0.18 sec)

  1. src/cmd/go/testdata/mod/rsc.io_sampler_v1.2.0.txt

    		}
    		f := strings.Split(line, ": ")
    		if len(f) != 3 {
    			continue
    		}
    		tag := language.Make(f[1])
    		tags = append(tags, tag)
    		t.byTag[tag.String()] = f[2]
    	}
    	t.matcher = language.NewMatcher(tags)
    	return t
    }
    
    // find finds the text to use for the given language tag preferences.
    func (t *text) find(prefs []language.Tag) string {
    	tag, _, _ := t.matcher.Match(prefs...)
    	s := t.byTag[tag.String()]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 12 20:46:50 UTC 2018
    - 3.2K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/mod/rsc.io_sampler_v1.2.1.txt

    		}
    		f := strings.Split(line, ": ")
    		if len(f) != 3 {
    			continue
    		}
    		tag := language.Make(f[1])
    		tags = append(tags, tag)
    		t.byTag[tag.String()] = f[2]
    	}
    	t.matcher = language.NewMatcher(tags)
    	return t
    }
    
    // find finds the text to use for the given language tag preferences.
    func (t *text) find(prefs []language.Tag) string {
    	tag, _, _ := t.matcher.Match(prefs...)
    	s := t.byTag[tag.String()]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 17:49:01 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go

    			}
    		}
    		strictCost := false
    		if utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForWebhooks) {
    			strictCost = true
    		}
    		m.compiledMatcher = matchconditions.NewMatcher(compiler.Compile(
    			expressions,
    			cel.OptionalVariableDeclarations{
    				HasParams:     false,
    				HasAuthorizer: true,
    				StrictCost:    strictCost,
    			},
    			environment.StoredExpressions,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher.go

    type matcher struct {
    	filter      celplugin.Filter
    	failPolicy  v1.FailurePolicyType
    	matcherType string
    	matcherKind string
    	objectName  string
    }
    
    func NewMatcher(filter celplugin.Filter, failPolicy *v1.FailurePolicyType, matcherKind, matcherType, objectName string) Matcher {
    	var f v1.FailurePolicyType
    	if failPolicy == nil {
    		f = v1.Fail
    	} else {
    		f = *failPolicy
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 24 14:46:11 UTC 2023
    - 5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/language/doc.go

    //
    // # Matching preferred against supported languages
    //
    // A Matcher for an application that supports English, Australian English,
    // Danish, and standard Mandarin can be created as follows:
    //
    //	var matcher = language.NewMatcher([]language.Tag{
    //	    language.English,   // The first language is used as fallback.
    //	    language.MustParse("en-AU"),
    //	    language.Danish,
    //	    language.Chinese,
    //	})
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/mod/rsc.io_sampler_v1.3.1.txt

    		}
    		f := strings.Split(line, ": ")
    		if len(f) != 3 {
    			continue
    		}
    		tag := language.Make(f[1])
    		tags = append(tags, tag)
    		t.byTag[tag.String()] = f[2]
    	}
    	t.matcher = language.NewMatcher(tags)
    	return t
    }
    
    // find finds the text to use for the given language tag preferences.
    func (t *text) find(prefs []language.Tag) string {
    	tag, _, _ := t.matcher.Match(prefs...)
    	s := t.byTag[tag.String()]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 12 20:46:50 UTC 2018
    - 4.7K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/mod/rsc.io_sampler_v1.3.0.txt

    		}
    		f := strings.Split(line, ": ")
    		if len(f) != 3 {
    			continue
    		}
    		tag := language.Make(f[1])
    		tags = append(tags, tag)
    		t.byTag[tag.String()] = f[2]
    	}
    	t.matcher = language.NewMatcher(tags)
    	return t
    }
    
    // find finds the text to use for the given language tag preferences.
    func (t *text) find(prefs []language.Tag) string {
    	tag, _, _ := t.matcher.Match(prefs...)
    	s := t.byTag[tag.String()]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 10 00:47:06 UTC 2018
    - 4.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go

    		for i := range matchConditions {
    			matchExpressionAccessors[i] = (*matchconditions.MatchCondition)(&matchConditions[i])
    		}
    		matcher = matchconditions.NewMatcher(filterCompiler.Compile(matchExpressionAccessors, optionalVars, environment.StoredExpressions), failurePolicy, "policy", "validate", policy.Name)
    	}
    	res := NewValidator(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/plugin.go

    	}
    	if c.authorizer == nil {
    		return errors.New("missing authorizer")
    	}
    
    	// Use default matcher
    	namespaceInformer := c.informerFactory.Core().V1().Namespaces()
    	c.matcher = matching.NewMatcher(namespaceInformer.Lister(), c.client)
    
    	if err := c.matcher.ValidateInitialization(); err != nil {
    		return err
    	}
    
    	c.source = c.sourceFactory(c.informerFactory, c.client, c.dynamicClient, c.restMapper)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 05 19:11:10 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher_test.go

    				},
    			},
    			failPolicy:  &ignore,
    			shouldMatch: false,
    			throwError:  false,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			m := NewMatcher(&fakeCelFilter{
    				evaluations: tc.evaluations,
    				throwError:  tc.throwError,
    			}, tc.failPolicy, "webhook", "test", "testhook")
    			ctx := context.TODO()
    			matchResult := m.Match(ctx, fakeVersionedAttr, nil, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 15 00:53:08 UTC 2023
    - 8.6K bytes
    - Viewed (0)
Back to top