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

Method Line

caddyconfig/caddyfile/dispenser.go:251–256  ·  view source on GitHub ↗

Line gets the line number of the current token. If there is no token loaded, it returns 0.

()

Source from the content-addressed store, hash-verified

249// Line gets the line number of the current token.
250// If there is no token loaded, it returns 0.
251func (d *Dispenser) Line() int {
252 if d.cursor < 0 || d.cursor >= len(d.tokens) {
253 return 0
254 }
255 return d.tokens[d.cursor].Line
256}
257
258// File gets the filename where the current token originated.
259func (d *Dispenser) File() string {

Callers 4

SyntaxErrMethod · 0.95
WrapErrMethod · 0.95
doImportMethod · 0.80
NewRouteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected