StringList maps configuration directive with the specified name to variable referenced by 'store' pointer. Configuration directive must be in form 'name arbitrary_string arbitrary_string ...' Where at least one argument must be present. See Custom function for details about inheritGlobal, required
(name string, inheritGlobal, required bool, defaultVal []string, store *[]string)
| 355 | // See Custom function for details about inheritGlobal, required and |
| 356 | // defaultVal. |
| 357 | func (m *Map) StringList(name string, inheritGlobal, required bool, defaultVal []string, store *[]string) { |
| 358 | m.Custom(name, inheritGlobal, required, func() (interface{}, error) { |
| 359 | return defaultVal, nil |
| 360 | }, func(_ *Map, node Node) (interface{}, error) { |
| 361 | if len(node.Args) == 0 { |
| 362 | return nil, NodeErr(node, "expected at least one argument") |
| 363 | } |
| 364 | if len(node.Children) != 0 { |
| 365 | return nil, NodeErr(node, "can't declare block here") |
| 366 | } |
| 367 | |
| 368 | return node.Args, nil |
| 369 | }, store) |
| 370 | } |
| 371 | |
| 372 | // String maps configuration directive with the specified name to variable |
| 373 | // referenced by 'store' pointer. |
no test coverage detected