- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 26 for mapfndel (0.17 sec)
-
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) -
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) -
src/go/ast/print.go
case reflect.Map: p.printf("%s (len = %d) {", x.Type(), x.Len()) if x.Len() > 0 { p.indent++ p.printf("\n") for _, key := range x.MapKeys() { p.print(key) p.printf(": ") p.print(x.MapIndex(key)) p.printf("\n") } p.indent-- } p.printf("}") case reflect.Pointer: p.printf("*") // type-checked ASTs may contain cycles - use ptrmap
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 5.9K bytes - Viewed (0) -
test/escape_reflect.go
return v.NumMethod() } // Unfortunate: k doesn't need to escape. func mapindex(m map[string]string, k string) string { // ERROR "m does not escape" "leaking param: k$" mv := reflect.ValueOf(m) kv := reflect.ValueOf(k) // ERROR "k escapes to heap" return mv.MapIndex(kv).String() } func mapkeys(m map[string]string) []reflect.Value { // ERROR "m does not escape" mv := reflect.ValueOf(m)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
operator/pkg/apis/istio/v1alpha1/validation/validation.go
} func processMap(e reflect.Value, failOnMissingValidation bool, values *valuesv1alpha1.Values, iopls *v1alpha1.IstioOperatorSpec) util.Errors { var validationErrors util.Errors for _, k := range e.MapKeys() { v := e.MapIndex(k) validationErrors = append(validationErrors, ValidateSubTypes(v, failOnMissingValidation, values, iopls)...) } return validationErrors
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 20:02:28 UTC 2024 - 14.9K bytes - Viewed (0) -
src/go/types/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" } } func exprString(fset *token.FileSet, expr ast.Expr) string { var buf strings.Builder format.Node(&buf, fset, expr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0) -
operator/pkg/compare/compare.go
return true } } return false }, cmp.Ignore()) } func pathToStringList(path cmp.Path) (up []string) { for _, step := range path { switch t := step.(type) { case cmp.MapIndex: up = append(up, fmt.Sprintf("%v", t.Key())) case cmp.SliceIndex: // Create an element, but never an NPath s := t.String() if util.IsNPathElement(s) { // Convert e.g. [0] to [#0]
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 13.3K bytes - Viewed (0) -
src/reflect/all_test.go
} // Check that value for missing key is zero. x := mv.MapIndex(ValueOf("hello")) if x.Kind() != Invalid { t.Errorf("m.MapIndex(\"hello\") for nil map = %v, want Invalid Value", x) } // Check big value too. var mbig map[string][10 << 20]byte x = ValueOf(mbig).MapIndex(ValueOf("hello")) if x.Kind() != Invalid { t.Errorf("mbig.MapIndex(\"hello\") for nil map = %v, want Invalid Value", x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0) -
src/text/template/funcs.go
} item = item.Index(x) case reflect.Map: index, err := prepareArg(index, item.Type().Key()) if err != nil { return reflect.Value{}, err } if x := item.MapIndex(index); x.IsValid() { item = x } else { item = reflect.Zero(item.Type().Elem()) } case reflect.Invalid: // the loop holds invariant: item.IsValid() panic("unreachable") default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 20.9K bytes - Viewed (0) -
src/reflect/value.go
} var stringType = rtypeOf("") // MapIndex returns the value associated with key in the map v. // It panics if v's Kind is not [Map]. // It returns the zero Value if key is not found in the map or if v represents a nil map. // As in Go, the key's value must be assignable to the map's key type. func (v Value) MapIndex(key Value) Value { v.mustBe(Map) tt := (*mapType)(unsafe.Pointer(v.typ()))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0)