From 4b49a323c388cfc0955a8d56e187242b4184bd3c Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 26 Dec 2017 13:26:38 -0500 Subject: [PATCH] go fmt slight change to go fmt coming in 0.10 --- backend/remote-state/manta/backend_state.go | 1 - backend/remote-state/manta/backend_test.go | 1 - backend/remote-state/manta/client.go | 1 - backend/remote-state/swift/backend_test.go | 1 - builtin/provisioners/habitat/resource_provisioner.go | 1 - command/apply_test.go | 1 - config_unix.go | 1 - helper/schema/resource.go | 1 - helper/schema/schema.go | 1 - terraform/context_apply_test.go | 1 - terraform/interpolate.go | 3 --- terraform/module_dependencies.go | 1 - 12 files changed, 14 deletions(-) diff --git a/backend/remote-state/manta/backend_state.go b/backend/remote-state/manta/backend_state.go index 3909573ef2..9081c2780c 100644 --- a/backend/remote-state/manta/backend_state.go +++ b/backend/remote-state/manta/backend_state.go @@ -78,7 +78,6 @@ func (b *Backend) State(name string) (state.State, error) { //if this isn't the default state name, we need to create the object so //it's listed by States. if name != backend.DefaultStateName { - // take a lock on this state while we write it lockInfo := state.NewLockInfo() lockInfo.Operation = "init" diff --git a/backend/remote-state/manta/backend_test.go b/backend/remote-state/manta/backend_test.go index 42b5d322e9..a457f233e9 100644 --- a/backend/remote-state/manta/backend_test.go +++ b/backend/remote-state/manta/backend_test.go @@ -64,7 +64,6 @@ func TestBackendLocked(t *testing.T) { } func createMantaFolder(t *testing.T, mantaClient *storage.StorageClient, directoryName string) { - // Be clear about what we're doing in case the user needs to clean // this up later. //t.Logf("creating Manta directory %s", directoryName) diff --git a/backend/remote-state/manta/client.go b/backend/remote-state/manta/client.go index 7743801c97..dde25c0829 100644 --- a/backend/remote-state/manta/client.go +++ b/backend/remote-state/manta/client.go @@ -88,7 +88,6 @@ func (c *RemoteClient) Delete() error { } func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) { - //At Joyent, we want to make sure that the State directory exists before we interact with it //We don't expect users to have to create it in advance //The order of operations of Backend State as follows: diff --git a/backend/remote-state/swift/backend_test.go b/backend/remote-state/swift/backend_test.go index d3dbe5acdb..e79342a761 100644 --- a/backend/remote-state/swift/backend_test.go +++ b/backend/remote-state/swift/backend_test.go @@ -213,7 +213,6 @@ func downloadSwiftObject(t *testing.T, osClient *gophercloud.ServiceClient, cont // Helper function to get a list of objects in a Swift container func getSwiftObjectNames(t *testing.T, osClient *gophercloud.ServiceClient, container string) (objectNames []string) { _ = objects.List(osClient, container, nil).EachPage(func(page pagination.Page) (bool, error) { - // Get a slice of object names names, err := objects.ExtractNames(page) if err != nil { diff --git a/builtin/provisioners/habitat/resource_provisioner.go b/builtin/provisioners/habitat/resource_provisioner.go index f093b0252d..2db068bf96 100644 --- a/builtin/provisioners/habitat/resource_provisioner.go +++ b/builtin/provisioners/habitat/resource_provisioner.go @@ -558,7 +558,6 @@ func (p *provisioner) startHabUnmanaged(o terraform.UIOutput, comm communicator. } func (p *provisioner) startHabSystemd(o terraform.UIOutput, comm communicator.Communicator, options string) error { - // Create a new template and parse the client config into it unitString := template.Must(template.New("hab-supervisor.service").Parse(systemdUnit)) diff --git a/command/apply_test.go b/command/apply_test.go index 3ae4d7adb1..968f8595f5 100644 --- a/command/apply_test.go +++ b/command/apply_test.go @@ -862,7 +862,6 @@ func TestApply_shutdown(t *testing.T) { *terraform.InstanceInfo, *terraform.InstanceState, *terraform.InstanceDiff) (*terraform.InstanceState, error) { - // only cancel once if !cancelled { shutdownCh <- struct{}{} diff --git a/config_unix.go b/config_unix.go index d28d749248..85c313a021 100644 --- a/config_unix.go +++ b/config_unix.go @@ -32,7 +32,6 @@ func configDir() (string, error) { func homeDir() (string, error) { // First prefer the HOME environmental variable if home := os.Getenv("HOME"); home != "" { - // FIXME: homeDir gets called from globalPluginDirs during init, before // the logging is setup. We should move meta initializtion outside of // init, but in the meantime we just need to silence this output. diff --git a/helper/schema/resource.go b/helper/schema/resource.go index 8290ba5035..c8e99b945b 100644 --- a/helper/schema/resource.go +++ b/helper/schema/resource.go @@ -282,7 +282,6 @@ func (r *Resource) ReadDataApply( d *terraform.InstanceDiff, meta interface{}, ) (*terraform.InstanceState, error) { - // Data sources are always built completely from scratch // on each read, so the source state is always nil. data, err := schemaMap(r.Schema).Data(nil, d) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index d9a7aa1a0c..6773fe5846 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -1528,7 +1528,6 @@ func (m schemaMap) validatePrimitive( raw interface{}, schema *Schema, c *terraform.ResourceConfig) ([]string, []error) { - // Catch if the user gave a complex type where a primitive was // expected, so we can return a friendly error message that // doesn't contain Go type system terminology. diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 7bc28f3bd2..ddaaae0b4f 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -3883,7 +3883,6 @@ func TestContext2Apply_outputDependsOn(t *testing.T) { info *InstanceInfo, is *InstanceState, id *InstanceDiff) (*InstanceState, error) { - // Sleep to allow parallel execution time.Sleep(50 * time.Millisecond) diff --git a/terraform/interpolate.go b/terraform/interpolate.go index 52ce1e886a..456e7e3a23 100644 --- a/terraform/interpolate.go +++ b/terraform/interpolate.go @@ -142,7 +142,6 @@ func (i *Interpolater) valueModuleVar( n string, v *config.ModuleVariable, result map[string]ast.Variable) error { - // Build the path to the child module we want path := make([]string, len(scope.Path), len(scope.Path)+1) copy(path, scope.Path) @@ -319,7 +318,6 @@ func (i *Interpolater) valueTerraformVar( n string, v *config.TerraformVariable, result map[string]ast.Variable) error { - // "env" is supported for backward compatibility, but it's deprecated and // so we won't advertise it as being allowed in the error message. It will // be removed in a future version of Terraform. @@ -701,7 +699,6 @@ func (i *Interpolater) computeResourceMultiVariable( func (i *Interpolater) interpolateComplexTypeAttribute( resourceID string, attributes map[string]string) (ast.Variable, error) { - // We can now distinguish between lists and maps in state by the count field: // - lists (and by extension, sets) use the traditional .# notation // - maps use the newer .% notation diff --git a/terraform/module_dependencies.go b/terraform/module_dependencies.go index b9f44a0e86..4594cb6033 100644 --- a/terraform/module_dependencies.go +++ b/terraform/module_dependencies.go @@ -17,7 +17,6 @@ import ( // present in the configuration. This is guaranteed not to happen for any // configuration that has passed a call to Config.Validate(). func ModuleTreeDependencies(root *module.Tree, state *State) *moduledeps.Module { - // First we walk the configuration tree to build the overall structure // and capture the explicit/implicit/inherited provider dependencies. deps := moduleTreeConfigDependencies(root, nil)