aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-07-26 23:13:01 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-07-26 23:13:01 +0200
commit981c887a191f8bf4482a22d6e1187dc9836a7f06 (patch)
treea72345444a20ca93232f8b9e1c672e4a6a85ac9a
parente8346d7378a74d107c1646eebb6430891aad0553 (diff)
...
-rw-r--r--file/file.go4
1 files 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):])