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

Function NewOptions

execution/options.go:16–28  ·  view source on GitHub ↗

NewOptions creates a new Options struct with the given options.

(opts ...ExecuteOptionFn)

Source from the content-addressed store, hash-verified

14
15// NewOptions creates a new Options struct with the given options.
16func NewOptions(opts ...ExecuteOptionFn) *Options {
17 o := &Options{
18 Funcs: DefaultFuncCollection,
19 Vars: map[string]*model.Value{},
20 }
21 for _, opt := range opts {
22 if opt == nil {
23 continue
24 }
25 opt(o)
26 }
27 return o
28}
29
30// WithFuncs sets the functions that can be used in the selector.
31func WithFuncs(fc FuncCollection) ExecuteOptionFn {

Callers 11

QueryFunction · 0.92
runFunction · 0.92
ReadMethod · 0.92
TestReduceFunction · 0.92
TestOptionsFunction · 0.92
TestErrorsFunction · 0.92
TestGroupByFunction · 0.92
TestMapValuesFunction · 0.92
TestKeyVarFunction · 0.92
runMethod · 0.92
TestVariableFunction · 0.92

Calls

no outgoing calls

Tested by 8

TestReduceFunction · 0.74
TestOptionsFunction · 0.74
TestErrorsFunction · 0.74
TestGroupByFunction · 0.74
TestMapValuesFunction · 0.74
TestKeyVarFunction · 0.74
runMethod · 0.74
TestVariableFunction · 0.74