Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 38 for mapfndel (0.14 sec)

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

    					return true
    				}
    			}
    			return false
    		}, cmp.Ignore()),
    		// ignore map entries that aren't set in v2
    		cmp.FilterPath(func(path cmp.Path) bool {
    			switch i := path.Last().(type) {
    			case cmp.MapIndex:
    				if _, v2 := i.Values(); !v2.IsValid() {
    					fmt.Println("E")
    					return true
    				}
    			}
    			return false
    		}, cmp.Ignore()),
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:45:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  2. src/go/types/index.go

    			return false
    		}
    		var key operand
    		check.expr(nil, &key, index)
    		check.assignment(&key, typ.key, "map index")
    		// ok to continue even if indexing failed - map element type is known
    		x.mode = mapindex
    		x.typ = typ.elem
    		x.expr = e.Orig
    		return false
    
    	case *Interface:
    		if !isTypeParam(x.typ) {
    			break
    		}
    		// TODO(gri) report detailed failure cause for better error messages
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. operator/pkg/tpath/struct.go

    	var structElems reflect.Value
    
    	switch kind {
    	case reflect.Map:
    		if path[0] == "" {
    			return nil, false, fmt.Errorf("getFromStructPath path %s, empty map key value", path)
    		}
    		mapVal := val.MapIndex(reflect.ValueOf(path[0]))
    		if !mapVal.IsValid() {
    			return nil, false, fmt.Errorf("getFromStructPath path %s, path does not exist", path)
    		}
    		return getFromStructPath(mapVal.Interface(), path[1:])
    	case reflect.Slice:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/printers/jsonpath.go

    			}
    			v = v.Index(int(x))
    		case reflect.Map:
    			if !index.IsValid() {
    				index = reflect.Zero(v.Type().Key())
    			}
    			if !index.Type().AssignableTo(v.Type().Key()) {
    				return false
    			}
    			if x := v.MapIndex(index); x.IsValid() {
    				v = x
    			} else {
    				v = reflect.Zero(v.Type().Elem())
    			}
    		default:
    			return false
    		}
    	}
    	if _, isNil := indirect(v); isNil {
    		return false
    	}
    	return true
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  5. src/go/types/assignments.go

    	switch x.mode {
    	case invalid:
    		return Typ[Invalid]
    	case variable, mapindex:
    		// ok
    	default:
    		if sel, ok := x.expr.(*ast.SelectorExpr); ok {
    			var op operand
    			check.expr(nil, &op, sel.X)
    			if op.mode == mapindex {
    				check.errorf(&x, UnaddressableFieldAssign, "cannot assign to struct field %s in map", ExprString(x.expr))
    				return Typ[Invalid]
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/assignments.go

    	switch x.mode {
    	case invalid:
    		return Typ[Invalid]
    	case variable, mapindex:
    		// ok
    	default:
    		if sel, ok := x.expr.(*syntax.SelectorExpr); ok {
    			var op operand
    			check.expr(nil, &op, sel.X)
    			if op.mode == mapindex {
    				check.errorf(&x, UnaddressableFieldAssign, "cannot assign to struct field %s in map", ExprString(x.expr))
    				return Typ[Invalid]
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/index.go

    			return false
    		}
    		var key operand
    		check.expr(nil, &key, index)
    		check.assignment(&key, typ.key, "map index")
    		// ok to continue even if indexing failed - map element type is known
    		x.mode = mapindex
    		x.typ = typ.elem
    		x.expr = e
    		return false
    
    	case *Interface:
    		if !isTypeParam(x.typ) {
    			break
    		}
    		// TODO(gri) report detailed failure cause for better error messages
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  8. src/reflect/deepequal.go

    		if v1.Len() != v2.Len() {
    			return false
    		}
    		if v1.UnsafePointer() == v2.UnsafePointer() {
    			return true
    		}
    		iter := v1.MapRange()
    		for iter.Next() {
    			val1 := iter.Value()
    			val2 := v2.MapIndex(iter.Key())
    			if !val1.IsValid() || !val2.IsValid() || !deepValueEqual(val1, val2, visited) {
    				return false
    			}
    		}
    		return true
    	case Func:
    		if v1.IsNil() && v2.IsNil() {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/example_test.go

    	case tv.IsType():
    		return "type"
    	case tv.IsBuiltin():
    		return "builtin"
    	case tv.IsNil():
    		return "nil"
    	case tv.Assignable():
    		if tv.Addressable() {
    			return "var"
    		}
    		return "mapindex"
    	case tv.IsValue():
    		return "value"
    	default:
    		return "unknown"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  10. tests/fuzz/crd_roundtrip_fuzzer.go

    		}
    	case reflect.Map:
    		if e.IsNil() {
    			return fmt.Errorf("field is nil")
    		}
    		for _, k := range e.MapKeys() {
    			if e.IsNil() {
    				return fmt.Errorf("field is nil")
    			}
    			err := checkForNil(e.MapIndex(k))
    			if err != nil {
    				return err
    			}
    		}
    	case reflect.Ptr:
    		if e.IsNil() {
    			return fmt.Errorf("field is nil")
    		}
    
    		err := checkForNil(e.Elem())
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top