Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for FilterOut (0.56 sec)

  1. 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)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion.go

    				s.Type = ""
    
    				changed = true
    			}
    
    			for f, fs := range s.Properties {
    				if fs.Nullable {
    					s.ValueValidation.Required, changed = filterOut(s.ValueValidation.Required, f)
    				}
    			}
    			if s.AdditionalProperties != nil && s.AdditionalProperties.Structural != nil && s.AdditionalProperties.Structural.Nullable {
    				s.ValueValidation.Required, changed = nil, true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 09 20:23:50 UTC 2020
    - 3.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/resource/result.go

    // multiple times, use the Infos() method.
    func (r *Result) Visit(fn VisitorFunc) error {
    	if r.err != nil {
    		return r.err
    	}
    	err := r.visitor.Visit(fn)
    	return utilerrors.FilterOut(err, r.ignoreErrors...)
    }
    
    // IntoSingleItemImplied sets the provided boolean pointer to true if the Builder input
    // implies a single item, or multiple.
    func (r *Result) IntoSingleItemImplied(b *bool) *Result {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 23:00:24 UTC 2019
    - 7.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
Back to top