MCPcopy Create free account
hub / github.com/foxcpp/maddy / Configure

Method Configure

internal/table/static.go:45–55  ·  view source on GitHub ↗
(inlineArgs []string, cfg *config.Map)

Source from the content-addressed store, hash-verified

43}
44
45func (s *Static) Configure(inlineArgs []string, cfg *config.Map) error {
46 cfg.Callback("entry", func(_ *config.Map, node config.Node) error {
47 if len(node.Args) < 2 {
48 return config.NodeErr(node, "expected at least one value")
49 }
50 s.m[node.Args[0]] = node.Args[1:]
51 return nil
52 })
53 _, err := cfg.Process()
54 return err
55}
56
57func (s *Static) Name() string {
58 return s.modName

Callers

nothing calls this directly

Calls 3

NodeErrFunction · 0.92
CallbackMethod · 0.80
ProcessMethod · 0.80

Tested by

no test coverage detected