1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 17:45:39 +00:00

*: 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) { func unvisPlainRune(p *unvisParser) ([]byte, error) {
ch, err := p.Peek() ch, err := p.Peek()
if err != nil { if err != nil {
return nil, fmt.Errorf("plain rune: %s", ch) return nil, fmt.Errorf("plain rune: %c", ch)
} }
p.Next() p.Next()
@ -238,8 +238,6 @@ func unvisEscapeSequence(p *unvisParser) ([]byte, error) {
default: default:
return unvisEscapeCStyle(p) return unvisEscapeCStyle(p)
} }
return nil, fmt.Errorf("escape sequence: unsupported sequence: %q", ch)
} }
func unvisRune(p *unvisParser) ([]byte, error) { 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) t.Errorf("unexpected error with %q: %s", test, err)
} }
if enc == test { if enc == test {
t.Errorf("expected encoding of %q to be changed") t.Errorf("expected encoding of %q to be changed", test)
} }
} }
} }