diff --git a/Makefile b/Makefile index ddf2ef861..d06de1f77 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ TEST?=$$(GO15VENDOREXPERIMENT=1 go list ./... | grep -v /vendor/) -VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods -nilfunc -printf -rangeloops -shift -structtags -unsafeptr +VETARGS?=-asmdecl -atomic -bool -buildtags -composites -copylocks -methods -nilfunc -printf -rangeloops -shift -structtags -unsafeptr default: test diff --git a/builtin/providers/heroku/resource_heroku_domain.go b/builtin/providers/heroku/resource_heroku_domain.go index b3c1de79f..f45d6795a 100644 --- a/builtin/providers/heroku/resource_heroku_domain.go +++ b/builtin/providers/heroku/resource_heroku_domain.go @@ -43,7 +43,7 @@ func resourceHerokuDomainCreate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Domain create configuration: %#v, %#v", app, hostname) - do, err := client.DomainCreate(app, heroku.DomainCreateOpts{hostname}) + do, err := client.DomainCreate(app, heroku.DomainCreateOpts{Hostname: hostname}) if err != nil { return err } diff --git a/builtin/providers/heroku/resource_heroku_drain.go b/builtin/providers/heroku/resource_heroku_drain.go index 6bbab1e18..9abe3cd9a 100644 --- a/builtin/providers/heroku/resource_heroku_drain.go +++ b/builtin/providers/heroku/resource_heroku_drain.go @@ -50,7 +50,7 @@ func resourceHerokuDrainCreate(d *schema.ResourceData, meta interface{}) error { var dr *heroku.LogDrain err := resource.Retry(2*time.Minute, func() error { - d, err := client.LogDrainCreate(app, heroku.LogDrainCreateOpts{url}) + d, err := client.LogDrainCreate(app, heroku.LogDrainCreateOpts{URL: url}) if err != nil { if strings.Contains(err.Error(), retryableError) { return err diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 4c71ebf66..2115c0b99 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -374,8 +374,8 @@ func resourceComputeInstanceV2Create(d *schema.ResourceData, meta interface{}) e if keyName, ok := d.Get("key_pair").(string); ok && keyName != "" { createOpts = &keypairs.CreateOptsExt{ - createOpts, - keyName, + CreateOptsBuilder: createOpts, + KeyName: keyName, } } @@ -384,8 +384,8 @@ func resourceComputeInstanceV2Create(d *schema.ResourceData, meta interface{}) e blockDeviceRaw := v.(map[string]interface{}) blockDevice := resourceInstanceBlockDeviceV2(d, blockDeviceRaw) createOpts = &bootfromvolume.CreateOptsExt{ - createOpts, - blockDevice, + CreateOptsBuilder: createOpts, + BlockDevice: blockDevice, } log.Printf("[DEBUG] Create BFV Options: %+v", createOpts) } @@ -396,8 +396,8 @@ func resourceComputeInstanceV2Create(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] schedulerhints: %+v", schedulerHintsRaw) schedulerHints := resourceInstanceSchedulerHintsV2(d, schedulerHintsRaw[0].(map[string]interface{})) createOpts = &schedulerhints.CreateOptsExt{ - createOpts, - schedulerHints, + CreateOptsBuilder: createOpts, + SchedulerHints: schedulerHints, } } diff --git a/builtin/providers/vsphere/resource_vsphere_virtual_machine.go b/builtin/providers/vsphere/resource_vsphere_virtual_machine.go index c89c0b8dd..517872d54 100644 --- a/builtin/providers/vsphere/resource_vsphere_virtual_machine.go +++ b/builtin/providers/vsphere/resource_vsphere_virtual_machine.go @@ -648,8 +648,8 @@ func buildNetworkDevice(f *find.Finder, label, adapterType string) (*types.Virtu return &types.VirtualDeviceConfigSpec{ Operation: types.VirtualDeviceConfigSpecOperationAdd, Device: &types.VirtualVmxnet3{ - types.VirtualVmxnet{ - types.VirtualEthernetCard{ + VirtualVmxnet: types.VirtualVmxnet{ + VirtualEthernetCard: types.VirtualEthernetCard{ VirtualDevice: types.VirtualDevice{ Key: -1, Backing: backing, @@ -663,7 +663,7 @@ func buildNetworkDevice(f *find.Finder, label, adapterType string) (*types.Virtu return &types.VirtualDeviceConfigSpec{ Operation: types.VirtualDeviceConfigSpecOperationAdd, Device: &types.VirtualE1000{ - types.VirtualEthernetCard{ + VirtualEthernetCard: types.VirtualEthernetCard{ VirtualDevice: types.VirtualDevice{ Key: -1, Backing: backing, diff --git a/state/remote/consul.go b/state/remote/consul.go index 6a3894b68..8ac686f24 100644 --- a/state/remote/consul.go +++ b/state/remote/consul.go @@ -33,7 +33,10 @@ func consulFactory(conf map[string]string) (Client, error) { } else { username = auth } - config.HttpAuth = &consulapi.HttpBasicAuth{username, password} + config.HttpAuth = &consulapi.HttpBasicAuth{ + Username: username, + Password: password, + } } client, err := consulapi.NewClient(config)