- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for FilterOut (0.29 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/errors/errors.go
func (agg aggregate) Errors() []error { return []error(agg) } // Matcher is used to match errors. Returns true if the error matches. type Matcher func(error) bool // FilterOut removes all errors that match any of the matchers from the input // error. If the input is a singular error, only that error is tested. If the // input implements the Aggregate interface, the list of errors will be
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jan 29 09:44:02 UTC 2023 - 6.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/validation/field/errors.go
} // Filter removes items from the ErrorList that match the provided fns. func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList { err := utilerrors.FilterOut(list.ToAggregate(), fns...) if err == nil { return nil } // FilterOut takes an Aggregate and returns an Aggregate return fromAggregate(err.(utilerrors.Aggregate))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 28 07:31:28 UTC 2023 - 11.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go
[]Matcher{func(err error) bool { return err.Error() == "def" }}, aggregate{aggregate{fmt.Errorf("abc")}}, }, } for i, testCase := range testCases { err := FilterOut(testCase.err, testCase.filter...) if !reflect.DeepEqual(testCase.expected, err) { t.Errorf("%d: expected %v, got %v", i, testCase.expected, err) } } } func TestFlatten(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jul 24 13:16:21 UTC 2022 - 12.7K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion_test.go
{"abc", []string{"a", "b", "c"}, "c", []string{"a", "b"}, true}, {"abbbcc", []string{"a", "b", "b", "b", "c", "c"}, "b", []string{"a", "c", "c"}, true}, } { t.Run(tt.name, func(t *testing.T) { got, gotChanged := filterOut(tt.input, tt.x) if !reflect.DeepEqual(tt.expected, got) { t.Errorf("expected slice %v, got %v", tt.expected, got) } if tt.expectedChanged != gotChanged {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 14:34:26 UTC 2023 - 23.2K bytes - Viewed (0)