- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 34 for mapfndel (0.89 sec)
-
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/validate/validate.go
for _, key := range fieldValue.MapKeys() { nnp := append(newPath, key.String()) errs = util.AppendErrs(errs, validateLeaf(validations, nnp, fieldValue.MapIndex(key), checkRequired)) } case reflect.Slice: for i := 0; i < fieldValue.Len(); i++ { newValue := fieldValue.Index(i).Interface() newPath := append(path, indexPathForSlice(fieldName, i))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jan 12 16:04:15 UTC 2023 - 7.7K 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) -
operator/pkg/translate/translate.go
} case reflect.Map: scope.Debug("Map") for _, key := range vv.MapKeys() { nnp := append(path, key.String()) errs = util.AppendErrs(errs, t.insertLeaf(root, nnp, vv.MapIndex(key))) } case reflect.Slice: scope.Debug("Slice") for i := 0; i < vv.Len(); i++ { errs = util.AppendErrs(errs, t.ProtoToHelmValues(vv.Index(i).Interface(), root, path)) } default:
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 19:43:09 UTC 2024 - 36.3K bytes - Viewed (0) -
src/runtime/map_test.go
} }() if useReflect { wg.Add(1) go func() { defer wg.Done() mv := reflect.ValueOf(m) keys := mv.MapKeys() for _, k := range keys { mv.MapIndex(k) } }() } } wg.Wait() } } } func TestConcurrentReadsAfterGrowth(t *testing.T) { testConcurrentReadsAfterGrowth(t, false) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 33.5K bytes - Viewed (0)