- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for StringMatcherWithPrefix (0.2 sec)
-
pilot/pkg/security/authz/matcher/string.go
MatchPattern: &matcher.StringMatcher_Exact{ Exact: exact, }, } } // StringMatcherWithPrefix creates a string matcher for v with the extra prefix inserted to the // created string matcher, note the prefix is ignored if v is wildcard ("*"). // The wildcard "*" will be generated as ".+" instead of ".*". func StringMatcherWithPrefix(v, prefix string) *matcher.StringMatcher { switch {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 25 10:39:25 UTC 2024 - 3.5K bytes - Viewed (0) -
pilot/pkg/security/authz/matcher/string_test.go
MatchPattern: &matcher.StringMatcher_Exact{ Exact: "abc-exact", }, }, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { actual := StringMatcherWithPrefix(tc.v, tc.prefix) if !cmp.Equal(actual, tc.want, protocmp.Transform()) { t.Errorf("want %s but got %s", tc.want.String(), actual.String()) } }) } } func TestStringMatcherRegex(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 17 22:42:11 UTC 2023 - 5.2K bytes - Viewed (0)