Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FilterPath (0.58 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/diff/diff.go

    // hand side of a comparison. This is useful in testing to assert that an
    // object is a derivative.
    func IgnoreUnset() cmp.Option {
    	return cmp.Options{
    		// ignore unset fields in v2
    		cmp.FilterPath(func(path cmp.Path) bool {
    			_, v2 := path.Last().Values()
    			switch v2.Kind() {
    			case reflect.Slice, reflect.Map:
    				if v2.IsNil() || v2.Len() == 0 {
    					return true
    				}
    			case reflect.String:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:45:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top