MCPcopy
hub / github.com/caddyserver/caddy / Args

Method Args

caddyconfig/caddyfile/dispenser.go:272–280  ·  view source on GitHub ↗

Args is a convenience function that loads the next arguments (tokens on the same line) into an arbitrary number of strings pointed to in targets. If there are not enough argument tokens available to fill targets, false is returned and the remaining targets are left unchanged. If all the targets are

(targets ...*string)

Source from the content-addressed store, hash-verified

270// targets are left unchanged. If all the targets are filled,
271// then true is returned.
272func (d *Dispenser) Args(targets ...*string) bool {
273 for i := range targets {
274 if !d.NextArg() {
275 return false
276 }
277 *targets[i] = d.Val()
278 }
279 return true
280}
281
282// AllArgs is like Args, but if there are more argument tokens
283// available than there are targets, false is returned. The

Callers 15

AllArgsMethod · 0.95
unmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
CELMatcherDecoratorFunction · 0.80
isCELConcatCallFunction · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
parseCaddyfileFunction · 0.80

Calls 2

NextArgMethod · 0.95
ValMethod · 0.95

Tested by 1

TestDispenser_ArgsFunction · 0.64