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

Method Args

framework/config/lexer/dispenser.go:191–201  ·  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 fewer tokens available than string pointers, the remaining strings will not be changed and false will be returned. If there were enough token

(targets ...*string)

Source from the content-addressed store, hash-verified

189// and false will be returned. If there were enough tokens available
190// to fill the arguments, then true will be returned.
191func (d *Dispenser) Args(targets ...*string) bool {
192 enough := true
193 for i := 0; i < len(targets); i++ {
194 if !d.NextArg() {
195 enough = false
196 break
197 }
198 *targets[i] = d.Val()
199 }
200 return enough
201}
202
203// RemainingArgs loads any more arguments (tokens on the same line)
204// into a slice and returns them. Open curly brace tokens also indicate

Callers 15

TestDispenser_ArgsFunction · 0.95
imapAcctCreateFunction · 0.80
imapAcctRemoveFunction · 0.80
usersCreateFunction · 0.80
usersRemoveFunction · 0.80
usersPasswordFunction · 0.80
imapAcctAppendlimitFunction · 0.80
mboxesListFunction · 0.80
mboxesCreateFunction · 0.80
mboxesRemoveFunction · 0.80
mboxesRenameFunction · 0.80
msgsAddFunction · 0.80

Calls 2

NextArgMethod · 0.95
ValMethod · 0.95

Tested by 1

TestDispenser_ArgsFunction · 0.76