From 981c887a191f8bf4482a22d6e1187dc9836a7f06 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 26 Jul 2017 23:13:01 +0200 Subject: ... --- file/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file/file.go b/file/file.go index 3e68f06..507cdd0 100644 --- a/file/file.go +++ b/file/file.go @@ -22,7 +22,7 @@ const ( ) // Original Error: "invalid comment in %s; must start with 'untrusted comment: '" -var ErrComment = errors.New("comment must start with 'untrusted comment: '") +var ErrUntrusted = errors.New("comment must start with 'untrusted comment: '") func DecodeFile(fname string, u encoding.BinaryUnmarshaler) (string, []byte, error) { fd, err := os.Open(fname) @@ -51,7 +51,7 @@ func Decode(r io.Reader, u encoding.BinaryUnmarshaler) (string, []byte, error) { return "", nil, err } if !strings.HasPrefix(comment, untrusted) { - return "", nil, ErrComment + return "", nil, ErrUntrusted } comment = strings.TrimSpace(comment[len(untrusted):]) -- cgit v1.2.3