From 07001b14672b64e208293f3a25b364d0f0c2932b Mon Sep 17 00:00:00 2001 From: kimsm28 Date: Wed, 15 Apr 2026 10:39:15 +0900 Subject: [PATCH] fix: replace WriteString(fmt.Sprintf()) with fmt.Fprintf() Replace sb.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&sb, ...) to follow staticcheck QF1012 recommendation. This is more efficient as it avoids creating an intermediate string. Signed-off-by: kimsm28 --- pkg/chart/common/util/jsonschema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chart/common/util/jsonschema.go b/pkg/chart/common/util/jsonschema.go index acd2ca100..108c1bcb8 100644 --- a/pkg/chart/common/util/jsonschema.go +++ b/pkg/chart/common/util/jsonschema.go @@ -82,7 +82,7 @@ func ValidateAgainstSchema(ch chart.Charter, values map[string]interface{}) erro slog.Debug("chart name", "chart-name", chrt.Name()) err := ValidateAgainstSingleSchema(values, chrt.Schema()) if err != nil { - sb.WriteString(fmt.Sprintf("%s:\n", chrt.Name())) + fmt.Fprintf(&sb, "%s:\n", chrt.Name()) sb.WriteString(err.Error()) } }