aboutsummaryrefslogtreecommitdiff
path: root/file/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'file/file.go')
-rw-r--r--file/file.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/file/file.go b/file/file.go
index c6fb266..3e68f06 100644
--- a/file/file.go
+++ b/file/file.go
@@ -53,8 +53,7 @@ func Decode(r io.Reader, u encoding.BinaryUnmarshaler) (string, []byte, error) {
if !strings.HasPrefix(comment, untrusted) {
return "", nil, ErrComment
}
- comment = strings.TrimPrefix(comment, untrusted)
- comment = strings.TrimSpace(comment)
+ comment = strings.TrimSpace(comment[len(untrusted):])
raw, err := buf.ReadString('\n')
if err != nil {