Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIgnoredFile ¶
IsIgnoredFile returns true if the given filename (which must not have a directory path ahead of it) should be ignored as e.g. an editor swap file.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is the main interface to read configuration files and other related files from disk.
It retains a cache of all files that are loaded so that they can be used to create source code snippets in diagnostics, etc.
func NewParser ¶
NewParser creates and returns a new Parser that reads files from the given filesystem. If a nil filesystem is passed then the system's "real" filesystem will be used, via afero.OsFs.
func (Parser) ConfigDirFiles ¶
ConfigDirFiles returns lists of the primary and override files configuration files in the given directory.
If the given directory does not exist or cannot be read, error diagnostics are returned. If errors are returned, the resulting lists may be incomplete.