@@ -10,20 +10,21 @@ import (
1010 "crypto/tls"
1111 "errors"
1212 "fmt"
13- "github.com/Telmate/proxmox-api-go/proxmox"
14- "github.com/hashicorp/hcl/v2/hcldec"
15- "github.com/hashicorp/packer-plugin-sdk/common"
16- "github.com/hashicorp/packer-plugin-sdk/hcl2helper"
17- packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
18- "github.com/hashicorp/packer-plugin-sdk/template/config"
19- "github.com/zclconf/go-cty/cty"
2013 "log"
2114 "net/url"
2215 "os"
2316 "regexp"
2417 "strconv"
2518 "strings"
2619 "time"
20+
21+ "github.com/Telmate/proxmox-api-go/proxmox"
22+ "github.com/hashicorp/hcl/v2/hcldec"
23+ "github.com/hashicorp/packer-plugin-sdk/common"
24+ "github.com/hashicorp/packer-plugin-sdk/hcl2helper"
25+ packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
26+ "github.com/hashicorp/packer-plugin-sdk/template/config"
27+ "github.com/zclconf/go-cty/cty"
2728)
2829
2930// Datasource has a bunch of filters which you can use, for example, to find the latest available
@@ -243,7 +244,7 @@ func getVmConfigs(client *proxmox.Client, vmList []proxmox.GuestResource) ([]vmC
243244
244245// Drop guests from list that are not match some filters in the datasource config.
245246func filterGuests (config Config , guests []proxmox.GuestResource ) []proxmox.GuestResource {
246- result := make ( []proxmox.GuestResource , 0 )
247+ var result []proxmox.GuestResource
247248
248249 if config .Name != "" {
249250 result = filterByName (guests , config .Name )
0 commit comments