summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/ini.v1/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/ini.v1/error.go')
-rw-r--r--vendor/gopkg.in/ini.v1/error.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/gopkg.in/ini.v1/error.go b/vendor/gopkg.in/ini.v1/error.go
index d88347c5..f66bc94b 100644
--- a/vendor/gopkg.in/ini.v1/error.go
+++ b/vendor/gopkg.in/ini.v1/error.go
@@ -32,3 +32,18 @@ func IsErrDelimiterNotFound(err error) bool {
func (err ErrDelimiterNotFound) Error() string {
return fmt.Sprintf("key-value delimiter not found: %s", err.Line)
}
+
+// ErrEmptyKeyName indicates the error type of no key name is found which there should be one.
+type ErrEmptyKeyName struct {
+ Line string
+}
+
+// IsErrEmptyKeyName returns true if the given error is an instance of ErrEmptyKeyName.
+func IsErrEmptyKeyName(err error) bool {
+ _, ok := err.(ErrEmptyKeyName)
+ return ok
+}
+
+func (err ErrEmptyKeyName) Error() string {
+ return fmt.Sprintf("empty key name: %s", err.Line)
+}