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

Method AllArgs

caddyconfig/caddyfile/dispenser.go:286–295  ·  view source on GitHub ↗

AllArgs is like Args, but if there are more argument tokens available than there are targets, false is returned. The number of available argument tokens must match the number of targets exactly to return true.

(targets ...*string)

Source from the content-addressed store, hash-verified

284// number of available argument tokens must match the number of
285// targets exactly to return true.
286func (d *Dispenser) AllArgs(targets ...*string) bool {
287 if !d.Args(targets...) {
288 return false
289 }
290 if d.NextArg() {
291 d.Prev()
292 return false
293 }
294 return true
295}
296
297// CountRemainingArgs counts the amount of remaining arguments
298// (tokens on the same line) without consuming the tokens.

Callers 13

parseACMEServerFunction · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
parseCaddyfileFunction · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
parseOptHTTPPortFunction · 0.80
parseOptHTTPSPortFunction · 0.80

Calls 3

ArgsMethod · 0.95
NextArgMethod · 0.95
PrevMethod · 0.95

Tested by

no test coverage detected