Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func WriteDefault ¶
WriteDefault writes the default config.toml and its companion schema.json to the primary XDG config dir, returning the paths written. Unless force is set, it refuses (writing nothing) and returns a *FileExistsError if either target already exists.
Types ¶
type Action ¶
Action is one entry in the enter-key menu: Label is the text shown next to its digit, Command is the arg vector run (after {{ }} interpolation) in the cursored repo's directory.
type FileExistsError ¶
type FileExistsError struct {
Path string
}
FileExistsError reports that WriteDefault refused to overwrite an existing target file. Path is the offending file.
func (*FileExistsError) Error ¶
func (e *FileExistsError) Error() string
type TOMLError ¶
type TOMLError struct {
// contains filtered or unexported fields
}
TOMLError adapts a go-toml decode error into a concise one-line message with the position prefixed ("line R, column C: msg"), since DecodeError.Error() omits the position and DecodeError.String()'s multi-line code frame mangles multi-line spans. It unwraps to the underlying *toml.DecodeError.
type ValidationError ¶
type ValidationError struct {
Issues []Issue
}
ValidationError reports config values that don't satisfy the schema, as a sorted list of plain-language issues (one per line).
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string