From c721dbd51151cf3008d410eb00b2c8da54d92ce0 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 10 Feb 2025 14:57:23 -0500 Subject: [PATCH] use slightly more efficient strings.Builder --- internal/tfdiags/config_traversals.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/tfdiags/config_traversals.go b/internal/tfdiags/config_traversals.go index 685780dbfc..de0aec979a 100644 --- a/internal/tfdiags/config_traversals.go +++ b/internal/tfdiags/config_traversals.go @@ -4,9 +4,9 @@ package tfdiags import ( - "bytes" "fmt" "strconv" + "strings" "github.com/zclconf/go-cty/cty" ) @@ -15,7 +15,7 @@ import ( // representation of a cty.Path. The result uses a syntax similar to the // HCL expression language in the hope of it being familiar to users. func FormatCtyPath(path cty.Path) string { - var buf bytes.Buffer + var buf strings.Builder for _, step := range path { switch ts := step.(type) { case cty.GetAttrStep: