mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 06:27:07 +08:00
hclparser: avoid unnecessary allocations in init
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user