MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Propagate

Method Propagate

options/options.go:136–146  ·  view source on GitHub ↗

Propagate propagates a value under the given key to the Options descendants if any.

(key string)

Source from the content-addressed store, hash-verified

134
135// Propagate propagates a value under the given key to the Options descendants if any.
136func (o *Options) Propagate(key string) {
137 if o.child == nil {
138 return
139 }
140
141 if v, ok := o.m[key]; ok {
142 for c := range o.Descendants() {
143 c.m[key] = v
144 }
145 }
146}
147
148// Delete removes an option by its key.
149func (o *Options) Delete(key string) {

Callers 1

TestPropagateMethod · 0.80

Calls 1

DescendantsMethod · 0.95

Tested by 1

TestPropagateMethod · 0.64