MCPcopy Create free account
hub / github.com/astercloud/aster / WithVariables

Function WithVariables

pkg/config/loader.go:46–50  ·  view source on GitHub ↗

WithVariables 设置自定义变量

(vars map[string]string)

Source from the content-addressed store, hash-verified

44
45// WithVariables 设置自定义变量
46func WithVariables(vars map[string]string) LoaderOption {
47 return func(l *Loader) {
48 l.variables = vars
49 }
50}
51
52// NewLoader 创建配置加载器
53func NewLoader(opts ...LoaderOption) *Loader {

Calls

no outgoing calls

Tested by 2

TestNewLoaderWithOptionsFunction · 0.68