diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index 84918d225..988335e21 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -118,7 +118,7 @@ func resourceAwsInstance() *schema.Resource { Optional: true, }, "iam_instance_profile": &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeString, ForceNew: true, Optional: true, }, diff --git a/builtin/providers/google/resource_compute_firewall.go b/builtin/providers/google/resource_compute_firewall.go index c7d32517f..dfd020cc4 100644 --- a/builtin/providers/google/resource_compute_firewall.go +++ b/builtin/providers/google/resource_compute_firewall.go @@ -76,7 +76,7 @@ func resourceComputeFirewall() *schema.Resource { "target_tags": &schema.Schema{ Type: schema.TypeSet, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Elem: &schema.Schema{Type: schema.TypeString}, Set: func(v interface{}) int { return hashcode.String(v.(string)) }, @@ -298,7 +298,7 @@ func resourceFirewall( var targetTags []string if v := d.Get("target_tags").(*schema.Set); v.Len() > 0 { targetTags = make([]string, v.Len()) - for i, v:= range v.List() { + for i, v := range v.List() { targetTags[i] = v.(string) } } diff --git a/command/get_test.go b/command/get_test.go index cce03611c..e706a7c2a 100644 --- a/command/get_test.go +++ b/command/get_test.go @@ -108,4 +108,3 @@ func TestGet_update(t *testing.T) { t.Fatalf("doesn't look like get: %s", output) } } - diff --git a/config/module/detect_github.go b/config/module/detect_github.go index 7e7deb653..c4a4e89f0 100644 --- a/config/module/detect_github.go +++ b/config/module/detect_github.go @@ -59,7 +59,7 @@ func (d *GitHubDetector) detectSSH(src string) (string, bool, error) { u.Scheme = "ssh" u.User = url.User("git") u.Host = "github.com" - u.Path = src[idx+1:qidx] + u.Path = src[idx+1 : qidx] if qidx < len(src) { q, err := url.ParseQuery(src[qidx+1:]) if err != nil { @@ -69,5 +69,5 @@ func (d *GitHubDetector) detectSSH(src string) (string, bool, error) { u.RawQuery = q.Encode() } - return "git::"+u.String(), true, nil + return "git::" + u.String(), true, nil } diff --git a/config/module/get_hg.go b/config/module/get_hg.go index 19e4abd5a..a979eacfd 100644 --- a/config/module/get_hg.go +++ b/config/module/get_hg.go @@ -39,7 +39,7 @@ func (g *HgGetter) Get(dst string, u *url.URL) error { } } - if err:= g.pull(dst, u); err != nil { + if err := g.pull(dst, u); err != nil { return err } diff --git a/config/module/get_test.go b/config/module/get_test.go index cf34f1ae8..831780214 100644 --- a/config/module/get_test.go +++ b/config/module/get_test.go @@ -34,7 +34,7 @@ func TestGet_file(t *testing.T) { func TestGet_fileForced(t *testing.T) { dst := tempDir(t) u := testModule("basic") - u = "file::"+u + u = "file::" + u if err := Get(dst, u); err != nil { t.Fatalf("err: %s", err) @@ -76,7 +76,7 @@ func TestGetCopy_file(t *testing.T) { func TestGetDirSubdir(t *testing.T) { cases := []struct { - Input string + Input string Dir, Sub string }{ { diff --git a/config/module/tree.go b/config/module/tree.go index b7cfc5108..bb2afc16e 100644 --- a/config/module/tree.go +++ b/config/module/tree.go @@ -2,9 +2,9 @@ package module import ( "bufio" - "path/filepath" "bytes" "fmt" + "path/filepath" "strings" "sync" diff --git a/rpc/client_test.go b/rpc/client_test.go index 5e3feb619..c4479cfd1 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -41,7 +41,6 @@ func TestClient_ResourceProvider(t *testing.T) { } } - func TestClient_ResourceProvisioner(t *testing.T) { clientConn, serverConn := testConn(t) diff --git a/terraform/context_test.go b/terraform/context_test.go index 25cb94e74..67144b2df 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -3,10 +3,10 @@ package terraform import ( "fmt" "reflect" + "sort" "strings" "sync" "testing" - "sort" ) func TestContextGraph(t *testing.T) { diff --git a/terraform/state.go b/terraform/state.go index 51dec770e..f71a34289 100644 --- a/terraform/state.go +++ b/terraform/state.go @@ -59,7 +59,6 @@ func (s *State) Children(path []string) []*ModuleState { return result } - // AddModule adds the module with the given path to the state. // // This should be the preferred method to add module states since it