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

Method File

framework/config/lexer/dispenser.go:175–183  ·  view source on GitHub ↗

File gets the filename of the current token. If there is no token loaded, it returns the filename originally given when parsing started.

()

Source from the content-addressed store, hash-verified

173// File gets the filename of the current token. If there is no token loaded,
174// it returns the filename originally given when parsing started.
175func (d *Dispenser) File() string {
176 if d.cursor < 0 || d.cursor >= len(d.tokens) {
177 return d.filename
178 }
179 if tokenFilename := d.tokens[d.cursor].File; tokenFilename != "" {
180 return tokenFilename
181 }
182 return d.filename
183}
184
185// Args is a convenience function that loads the next arguments
186// (tokens on the same line) into an arbitrary number of strings

Callers 5

SyntaxErrMethod · 0.95
ErrMethod · 0.95
dupTCPListenerFunction · 0.80
dupUnixListenerFunction · 0.80
readNodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected