diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-28 00:09:17 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-28 00:09:17 +0900 |
commit | bb9bf495bd6cee65d8bc821939051d1be99861cc (patch) | |
tree | a782616a4a4faee834a08bded1451c298596d5b2 /spec/lexer.go | |
parent | Use golangci-lint (diff) | |
download | urubu-bb9bf495bd6cee65d8bc821939051d1be99861cc.tar.gz urubu-bb9bf495bd6cee65d8bc821939051d1be99861cc.tar.xz |
Follow golangci-lint
Diffstat (limited to 'spec/lexer.go')
-rw-r--r-- | spec/lexer.go | 8 |
1 files changed, 4 insertions, 4 deletions
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, |