From bb9bf495bd6cee65d8bc821939051d1be99861cc Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Mon, 28 Mar 2022 00:09:17 +0900 Subject: Follow golangci-lint --- spec/lexer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/lexer.go') diff --git a/spec/lexer.go b/spec/lexer.go index 80beba0..ba64925 100644 --- a/spec/lexer.go +++ b/spec/lexer.go @@ -205,7 +205,7 @@ func (l *lexer) lexAndSkipWSs() (*token, error) { // The escape sequences in a pattern string are interpreted by the lexer, except for the \". // We must interpret the \" before passing them to the lexer because they are delimiters for // the pattern strings. - fmt.Fprintf(&b, strings.ReplaceAll(string(tok.Lexeme), `\"`, `"`)) + fmt.Fprint(&b, strings.ReplaceAll(string(tok.Lexeme), `\"`, `"`)) case KindIDEscapeSymbol: return nil, &verr.SpecError{ Cause: synErrIncompletedEscSeq, @@ -240,13 +240,13 @@ func (l *lexer) lexAndSkipWSs() (*token, error) { } switch tok.KindID { case KindIDCharSeq: - fmt.Fprintf(&b, string(tok.Lexeme)) + fmt.Fprint(&b, string(tok.Lexeme)) case KindIDEscapedQuot: // Remove '\' character. - fmt.Fprintf(&b, `'`) + fmt.Fprint(&b, `'`) case KindIDEscapedBackSlash: // Remove '\' character. - fmt.Fprintf(&b, `\`) + fmt.Fprint(&b, `\`) case KindIDEscapeSymbol: return nil, &verr.SpecError{ Cause: synErrIncompletedEscSeq, -- cgit v1.2.3