MCPcopy
hub / github.com/TomWright/dasel / WithVariable

Function WithVariable

execution/options.go:38–42  ·  view source on GitHub ↗

WithVariable sets a variable for use in the selector.

(key string, val *model.Value)

Source from the content-addressed store, hash-verified

36
37// WithVariable sets a variable for use in the selector.
38func WithVariable(key string, val *model.Value) ExecuteOptionFn {
39 return func(o *Options) {
40 o.Vars[key] = val
41 }
42}
43
44// WithUnstable allows access to potentially unstable features.
45func WithUnstable() ExecuteOptionFn {

Callers 4

runFunction · 0.92
variableOptionsFunction · 0.92
TestKeyVarFunction · 0.92
TestVariableFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestKeyVarFunction · 0.74
TestVariableFunction · 0.74