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

Method Val

caddyconfig/caddyfile/dispenser.go:202–207  ·  caddyconfig/caddyfile/dispenser.go::Dispenser.Val

Val gets the text of the current token. If there is no token loaded, it returns empty string.

()

Source from the content-addressed store, hash-verified

200// Val gets the text of the current token. If there is no token
201// loaded, it returns empty string.
202func (d *Dispenser) Val() string {
203 if d.cursor < 0 || d.cursor >= len(d.tokens) {
204 return ""
205 }
206 return d.tokens[d.cursor].Text
207}
208
209// ValRaw gets the raw text of the current token (including quotes).
210// If the token was a heredoc, then the delimiter is not included,

Callers 15

doImportMethod · 0.95
NextArgMethod · 0.95
NextBlockMethod · 0.95
ArgsMethod · 0.95
RemainingArgsMethod · 0.95
ArgErrMethod · 0.95
SyntaxErrMethod · 0.95
parseACMEServerFunction · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80

Calls

no outgoing calls

Tested by 4

UnmarshalCaddyfileMethod · 0.64
TestDispenser_Val_NextFunction · 0.64
TestDispenser_NextArgFunction · 0.64
TestDispenser_NextLineFunction · 0.64