aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-16 00:33:44 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-16 00:33:44 +0200
commitff8b08bf43f5ee60dc995b60e8505cfe90d0de3c (patch)
treea3cec7812d258c02b2c269ce20d95821c8e25e50
parentb1b78c711ebd86ae06ffcf1e5508ca78a848037b (diff)
kiss
-rw-r--r--file.go8
-rw-r--r--file_test.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/file.go b/file.go
index 0497c09..e2f5536 100644
--- a/file.go
+++ b/file.go
@@ -18,8 +18,8 @@ type File struct {
}
const (
- commentHdr = "untrusted comment: "
- verifyWith = "verify with "
+ commentHdr = "untrusted comment:"
+ verifyWith = "verify with"
pubKey = "%s public key"
secKey = "%s secret key"
sigFrom = "signature from %s"
@@ -88,8 +88,8 @@ func (f File) Bytes() ([]byte, error) {
}
func (f File) WriteTo(w io.Writer) error {
- fmt.Fprintf(w, "%v%v\n", commentHdr, f.Comment)
- fmt.Fprintf(w, "%v\n", string(f.B64))
+ fmt.Fprintln(w, commentHdr, f.Comment)
+ fmt.Fprintln(w, string(f.B64))
if f.Body != nil {
fmt.Fprintf(w, "%v", string(f.Body))
}
diff --git a/file_test.go b/file_test.go
index acacb2e..3bb28e1 100644
--- a/file_test.go
+++ b/file_test.go
@@ -35,7 +35,7 @@ func TestParseFile(t *testing.T) {
}
if !bytes.Equal(res, body) {
- t.Errorf("got %v, want %v", res, body)
+ t.Errorf("got %s, want %s", res, body)
}
})
}