From 73ef85bc5db590c22689e11be20737a3dd88168f Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Wed, 28 Dec 2016 21:18:36 +0000 Subject: Update dependencies --- vendor/github.com/pelletier/go-toml/keysparsing.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/pelletier/go-toml/keysparsing.go') diff --git a/vendor/github.com/pelletier/go-toml/keysparsing.go b/vendor/github.com/pelletier/go-toml/keysparsing.go index b67664f..d62ca5f 100644 --- a/vendor/github.com/pelletier/go-toml/keysparsing.go +++ b/vendor/github.com/pelletier/go-toml/keysparsing.go @@ -4,6 +4,7 @@ package toml import ( "bytes" + "errors" "fmt" "unicode" ) @@ -47,7 +48,7 @@ func parseKey(key string) ([]string, error) { } else { if !wasInQuotes { if buffer.Len() == 0 { - return nil, fmt.Errorf("empty key group") + return nil, errors.New("empty table key") } groups = append(groups, buffer.String()) buffer.Reset() @@ -67,23 +68,23 @@ func parseKey(key string) ([]string, error) { return nil, fmt.Errorf("invalid bare character: %c", char) } if !inQuotes && expectDot { - return nil, fmt.Errorf("what?") + return nil, errors.New("what?") } buffer.WriteRune(char) expectDot = false } } if inQuotes { - return nil, fmt.Errorf("mismatched quotes") + return nil, errors.New("mismatched quotes") } if escapeNext { - return nil, fmt.Errorf("unfinished escape sequence") + return nil, errors.New("unfinished escape sequence") } if buffer.Len() > 0 { groups = append(groups, buffer.String()) } if len(groups) == 0 { - return nil, fmt.Errorf("empty key") + return nil, errors.New("empty key") } return groups, nil } -- cgit v1.2.3