From c889416068e8e3dcc54910382c5be40e56640b08 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 16 Feb 2017 03:08:07 +1100 Subject: [PATCH] *: fix go-vet errors Signed-off-by: Aleksa Sarai --- unvis.go | 4 +--- vis_test.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/unvis.go b/unvis.go index f8dd6b1..8a26218 100644 --- a/unvis.go +++ b/unvis.go @@ -74,7 +74,7 @@ func newParser(input string, flag VisFlag) *unvisParser { func unvisPlainRune(p *unvisParser) ([]byte, error) { ch, err := p.Peek() if err != nil { - return nil, fmt.Errorf("plain rune: %s", ch) + return nil, fmt.Errorf("plain rune: %c", ch) } p.Next() @@ -238,8 +238,6 @@ func unvisEscapeSequence(p *unvisParser) ([]byte, error) { default: return unvisEscapeCStyle(p) } - - return nil, fmt.Errorf("escape sequence: unsupported sequence: %q", ch) } func unvisRune(p *unvisParser) ([]byte, error) { diff --git a/vis_test.go b/vis_test.go index e4ef083..5177a58 100644 --- a/vis_test.go +++ b/vis_test.go @@ -121,7 +121,7 @@ func TestVisChanged(t *testing.T) { t.Errorf("unexpected error with %q: %s", test, err) } if enc == test { - t.Errorf("expected encoding of %q to be changed") + t.Errorf("expected encoding of %q to be changed", test) } } }