Skip to content

Commit 0d26d2e

Browse files
author
Luca Bruno
authored
Merge pull request #332 from cgwalters/quote-deserialize
deserialize: Use quote to print possibly-invalid string
2 parents d657f96 + 6e15d2f commit 0d26d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unit/deserialize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (l *lexer) lexSectionSuffixFunc(section string) lexStep {
123123

124124
garbage = bytes.TrimSpace(garbage)
125125
if len(garbage) > 0 {
126-
return nil, fmt.Errorf("found garbage after section name %s: %v", l.section, garbage)
126+
return nil, fmt.Errorf("found garbage after section name %s: %q", l.section, garbage)
127127
}
128128

129129
return l.lexNextSectionOrOptionFunc(section), nil

0 commit comments

Comments
 (0)