From 1782cdc0cbe61210f7f0c9f6dcc02d2a31fc278a Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Fri, 13 Dec 2024 21:37:38 +0300 Subject: [PATCH] chore: Changing fmt.Fprintf to fmt.Fprint when there is no formatting required (#156) Signed-off-by: Sasha Melentyev --- peg.peg.go | 2 +- tree/peg.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/peg.peg.go b/peg.peg.go index 8222888..e772a68 100644 --- a/peg.peg.go +++ b/peg.peg.go @@ -252,7 +252,7 @@ func (node *node32) print(w io.Writer, pretty bool, buffer string) { print = func(node *node32, depth int) { for node != nil { for c := 0; c < depth; c++ { - fmt.Fprintf(w, " ") + fmt.Fprint(w, " ") } rule := rul3s[node.pegRule] quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end]))) diff --git a/tree/peg.go b/tree/peg.go index 3d02637..04c8fef 100644 --- a/tree/peg.go +++ b/tree/peg.go @@ -71,7 +71,7 @@ func (node *node32) print(w io.Writer, pretty bool, buffer string) { print = func(node *node32, depth int) { for node != nil { for c := 0; c < depth; c++ { - fmt.Fprintf(w, " ") + fmt.Fprint(w, " ") } rule := rul3s[node.pegRule] quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end])))