forked from muja/goconfig
-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
43 lines (29 loc) · 1.73 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package goconfig
import "errors"
// ErrInvalidEscapeSequence indicates that the escape character ('\')
// was followed by an invalid character.
var ErrInvalidEscapeSequence = errors.New("unknown escape sequence")
// ErrUnfinishedQuote indicates that a value has an odd number of (unescaped) quotes
var ErrUnfinishedQuote = errors.New("unfinished quote")
// ErrMissingEquals indicates that an equals sign ('=') was expected but not found
var ErrMissingEquals = errors.New("expected '='")
// ErrPartialBOM indicates that the file begins with a partial UTF8-BOM
var ErrPartialBOM = errors.New("partial UTF8-BOM")
// ErrInvalidKeyChar indicates that there was an invalid key character
var ErrInvalidKeyChar = errors.New("invalid key character")
// ErrInvalidSectionChar indicates that there was an invalid character in section
var ErrInvalidSectionChar = errors.New("invalid character in section")
// ErrUnexpectedEOF indicates that there was an unexpected EOF
var ErrUnexpectedEOF = errors.New("unexpected EOF")
// ErrSectionNewLine indicates that there was a newline in section
var ErrSectionNewLine = errors.New("newline in section")
// ErrMissingStartQuote indicates that there was a missing start quote
var ErrMissingStartQuote = errors.New("missing start quote")
// ErrMissingClosingBracket indicates that there was a missing closing bracket in section
var ErrMissingClosingBracket = errors.New("missing closing section bracket")
// ErrNotBoolValue indicates fail to convert config variable to bool
var ErrNotBoolValue = errors.New("not a bool value")
// ErrNotInGitDir indicates not in a git dir
var ErrNotInGitDir = errors.New("not in a git dir")
// ErrNotExist indicates file or dir not exist
var ErrNotExist = errors.New("config file or dir not exist")