From 7274325231bc91c3b5b97eb26ebb5ccaa2d2b715 Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Mon, 22 Jun 2026 15:24:24 +0800 Subject: [PATCH] Fix non-constant Fprintf format strings Signed-off-by: HNO3Miracle --- match/debug/debug.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/match/debug/debug.go b/match/debug/debug.go index 5c5dbc1..c678c94 100644 --- a/match/debug/debug.go +++ b/match/debug/debug.go @@ -27,7 +27,7 @@ func graphviz_internal(m match.Matcher, id string) string { default: sub := fmt.Sprintf("%x", rand.Int63()) fmt.Fprintf(buf, `"%s"->"%s";`, id, sub) - fmt.Fprintf(buf, graphviz_internal(n, sub)) + fmt.Fprint(buf, graphviz_internal(n, sub)) } } @@ -35,7 +35,7 @@ func graphviz_internal(m match.Matcher, id string) string { fmt.Fprintf(buf, `"%s"[label="AnyOf"];`, id) for _, m := range matcher.Matchers { rnd := rand.Int63() - fmt.Fprintf(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) + fmt.Fprint(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) fmt.Fprintf(buf, `"%s"->"%x";`, id, rnd) } @@ -43,7 +43,7 @@ func graphviz_internal(m match.Matcher, id string) string { fmt.Fprintf(buf, `"%s"[label="EveryOf"];`, id) for _, m := range matcher.Matchers { rnd := rand.Int63() - fmt.Fprintf(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) + fmt.Fprint(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) fmt.Fprintf(buf, `"%s"->"%x";`, id, rnd) }