aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):])