MCPcopy
hub / github.com/argoproj/argo-workflows / SetNestedField

Method SetNestedField

hack/manifests/helpers.go:71–74  ·  view source on GitHub ↗
(value any, fields ...string)

Source from the content-addressed store, hash-verified

69}
70
71func (o *obj) SetNestedField(value any, fields ...string) {
72 parentField := nestedFieldNoCopy[map[string]any](o, fields[:len(fields)-1]...)
73 parentField[fields[len(fields)-1]] = value
74}
75
76func (o *obj) CopyNestedField(sourceFields []string, targetFields []string) {
77 value := nestedFieldNoCopy[any](o, sourceFields...)

Callers 3

CopyNestedFieldMethod · 0.95
TestSetNestedFieldFunction · 0.95
patchMetadataFunction · 0.80

Calls 1

nestedFieldNoCopyFunction · 0.85

Tested by 1

TestSetNestedFieldFunction · 0.76