From 17b137c972ad647581531d23ea061de391957c91 Mon Sep 17 00:00:00 2001 From: Jon Perritt Date: Tue, 27 Jan 2015 10:19:11 -0700 Subject: [PATCH] go fmt --- builtin/providers/openstack/provider.go | 6 +++--- builtin/providers/openstack/provider_test.go | 1 - .../resource_openstack_compute_instance_v2.go | 12 ++++++------ .../resource_openstack_compute_instance_v2_test.go | 3 +-- .../openstack/resource_openstack_lb_vip_v1.go | 2 +- .../resource_openstack_networking_network_v2.go | 8 ++++---- 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/builtin/providers/openstack/provider.go b/builtin/providers/openstack/provider.go index 37a6e9b4c..b28c330bc 100644 --- a/builtin/providers/openstack/provider.go +++ b/builtin/providers/openstack/provider.go @@ -32,9 +32,9 @@ func Provider() terraform.ResourceProvider { Default: "", }, "tenant_name": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - DefaultFunc: envDefaultFunc("OS_TENANT_NAME"), + Type: schema.TypeString, + Optional: true, + DefaultFunc: envDefaultFunc("OS_TENANT_NAME"), }, "password": &schema.Schema{ Type: schema.TypeString, diff --git a/builtin/providers/openstack/provider_test.go b/builtin/providers/openstack/provider_test.go index 57257f5d0..9e90bb4ea 100644 --- a/builtin/providers/openstack/provider_test.go +++ b/builtin/providers/openstack/provider_test.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/terraform/terraform" ) - var ( OS_REGION_NAME = "" ) diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index bacf3707e..8b23c5a87 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -36,15 +36,15 @@ func resourceComputeInstanceV2() *schema.Resource { ForceNew: false, }, "image_ref": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: false, + Type: schema.TypeString, + Required: true, + ForceNew: false, DefaultFunc: envDefaultFunc("OS_IMAGE_ID"), }, "flavor_ref": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: false, + Type: schema.TypeString, + Required: true, + ForceNew: false, DefaultFunc: envDefaultFunc("OS_FLAVOR_ID"), }, "security_groups": &schema.Schema{ diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go index 4b73957d2..ff2457d09 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go @@ -73,7 +73,6 @@ func testAccCheckComputeV2InstanceExists(t *testing.T, n string, instance *serve return fmt.Errorf("(testAccCheckComputeV2InstanceExists) Error creating OpenStack compute client: %s", err) } - found, err := servers.Get(computeClient, rs.Primary.ID).Extract() if err != nil { return err @@ -120,4 +119,4 @@ var testAccComputeV2Instance_basic = fmt.Sprintf(` foo = "bar" } }`, - OS_REGION_NAME) + OS_REGION_NAME) diff --git a/builtin/providers/openstack/resource_openstack_lb_vip_v1.go b/builtin/providers/openstack/resource_openstack_lb_vip_v1.go index 748ed8d6a..eefe239be 100644 --- a/builtin/providers/openstack/resource_openstack_lb_vip_v1.go +++ b/builtin/providers/openstack/resource_openstack_lb_vip_v1.go @@ -169,7 +169,7 @@ func resourceLBVipV1Read(d *schema.ResourceData, meta interface{}) error { } if t, exists := d.GetOk("persistence"); exists && t != "" { - d.Set("persistence", p.Description) + d.Set("persistence", p.Description) } if t, exists := d.GetOk("conn_limit"); exists && t != "" { diff --git a/builtin/providers/openstack/resource_openstack_networking_network_v2.go b/builtin/providers/openstack/resource_openstack_networking_network_v2.go index 92e02e031..e32db9697 100644 --- a/builtin/providers/openstack/resource_openstack_networking_network_v2.go +++ b/builtin/providers/openstack/resource_openstack_networking_network_v2.go @@ -20,9 +20,9 @@ func resourceNetworkingNetworkV2() *schema.Resource { Schema: map[string]*schema.Schema{ "region": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, DefaultFunc: envDefaultFunc("OS_REGION_NAME"), }, "name": &schema.Schema{ @@ -111,7 +111,7 @@ func resourceNetworkingNetworkV2Read(d *schema.ResourceData, meta interface{}) e d.Set("region", d.Get("region").(string)) - if t, exists := d.GetOk("name"); exists && t != ""{ + if t, exists := d.GetOk("name"); exists && t != "" { d.Set("name", n.Name) } else { d.Set("name", "")