*: fix go-vet errors

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai 2017-02-16 03:08:07 +11:00
parent c9551d5820
commit c889416068
No known key found for this signature in database
GPG Key ID: 9E18AA267DDB8DB4
2 changed files with 2 additions and 4 deletions

View File

@ -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) {

View File

@ -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)
}
}
}