Fix errors with gofmt compliance

This commit is contained in:
James Nugent 2015-12-17 12:24:24 -05:00
parent 6d6487e288
commit 8e538b68ec
9 changed files with 67 additions and 76 deletions

View File

@ -804,7 +804,7 @@ func waitForTableToBeActive(tableName string, meta interface{}) error {
func validateStreamViewType(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
viewTypes := map[string]bool {
viewTypes := map[string]bool{
"KEYS_ONLY": true,
"NEW_IMAGE": true,
"OLD_IMAGE": true,

View File

@ -46,7 +46,7 @@ func TestAccAWSSecurityGroup_basic(t *testing.T) {
})
}
func TestAccAWSSecurityGroup_namePrefix( t *testing.T) {
func TestAccAWSSecurityGroup_namePrefix(t *testing.T) {
var group ec2.SecurityGroup
resource.Test(t, resource.TestCase{
@ -345,7 +345,7 @@ func testAccCheckAWSSecurityGroupDestroy(s *terraform.State) error {
}
func testAccCheckAWSSecurityGroupGeneratedNamePrefix(
resource, prefix string) resource.TestCheckFunc {
resource, prefix string) resource.TestCheckFunc {
return func(s *terraform.State) error {
r, ok := s.RootModule().Resources[resource]
if !ok {

View File

@ -67,7 +67,6 @@ func resourceVSphereFolderCreate(d *schema.ResourceData, meta interface{}) error
return resourceVSphereFolderRead(d, meta)
}
func createFolder(client *govmomi.Client, f *folder) error {
finder := find.NewFinder(client.Client, true)
@ -113,7 +112,6 @@ func createFolder(client *govmomi.Client, f *folder) error {
return nil
}
func resourceVSphereFolderRead(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] reading folder: %#v", d)

View File

@ -5,7 +5,6 @@ import (
"os"
"testing"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/vmware/govmomi"
@ -171,7 +170,6 @@ func testAccCheckVSphereFolderExists(n string, f *folder) resource.TestCheckFunc
_, err = object.NewSearchIndex(client.Client).FindChild(context.TODO(), dcFolders.VmFolder, rs.Primary.Attributes["path"])
*f = folder{
path: rs.Primary.Attributes["path"],
}
@ -206,7 +204,6 @@ func testAccCheckVSphereFolderExistingPathExists(n string, f *folder) resource.T
_, err = object.NewSearchIndex(client.Client).FindChild(context.TODO(), dcFolders.VmFolder, rs.Primary.Attributes["existing_path"])
*f = folder{
path: rs.Primary.Attributes["path"],
}
@ -235,7 +232,7 @@ func createVSphereFolder(datacenter string, folder_name string) error {
client := testAccProvider.Meta().(*govmomi.Client)
f := folder{path: folder_name, datacenter: datacenter,}
f := folder{path: folder_name, datacenter: datacenter}
folder, err := object.NewSearchIndex(client.Client).FindByInventoryPath(
context.TODO(), fmt.Sprintf("%v/vm/%v", datacenter, folder_name))
@ -254,7 +251,7 @@ func createVSphereFolder(datacenter string, folder_name string) error {
func removeVSphereFolder(datacenter string, folder_name string, existing_path string) resource.TestCheckFunc {
f := folder{path: folder_name, datacenter: datacenter, existingPath: existing_path,}
f := folder{path: folder_name, datacenter: datacenter, existingPath: existing_path}
return func(s *terraform.State) error {

View File

@ -344,7 +344,6 @@ func testAccCheckVSphereVirtualMachineDestroy(s *terraform.State) error {
return fmt.Errorf("error %s", err)
}
folder := dcFolders.VmFolder
if len(rs.Primary.Attributes["folder"]) > 0 {
si := object.NewSearchIndex(client.Client)
@ -370,7 +369,6 @@ func testAccCheckVSphereVirtualMachineDestroy(s *terraform.State) error {
func testAccCheckVSphereVirtualMachineExistsHasCustomConfig(n string, vm *virtualMachine) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]
if !ok {
return fmt.Errorf("Not found: %s", n)
@ -393,7 +391,6 @@ func testAccCheckVSphereVirtualMachineExistsHasCustomConfig(n string, vm *virtua
return fmt.Errorf("error %s", err)
}
_, err = object.NewSearchIndex(client.Client).FindChild(context.TODO(), dcFolders.VmFolder, rs.Primary.Attributes["name"])
if err != nil {
return fmt.Errorf("error %s", err)
@ -493,7 +490,6 @@ func testAccCheckVSphereVirtualMachineExists(n string, vm *virtualMachine) resou
_, err = object.NewSearchIndex(client.Client).FindChild(context.TODO(), folder, rs.Primary.Attributes["name"])
*vm = virtualMachine{
name: rs.Primary.ID,
}