hclparser: avoid unnecessary allocations in init

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2024-07-15 13:35:04 -07:00
parent b92bfb53d2
commit 85cf3bace9
2 changed files with 162 additions and 148 deletions

View File

@ -34,7 +34,7 @@ func TestIndexOf(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
got, err := indexOfFunc.Call([]cty.Value{test.input, test.key})
got, err := indexOfFunc().Call([]cty.Value{test.input, test.key})
if err != nil {
if test.wantErr {
return