diff --git a/commands/displayers/vpc.go b/commands/displayers/vpc.go index 940de4a4c..508f1039d 100644 --- a/commands/displayers/vpc.go +++ b/commands/displayers/vpc.go @@ -64,7 +64,7 @@ func (v *VPC) KV() []map[string]interface{} { "URN": v.URN, "Name": v.Name, "Description": v.Description, - "IPRange": v.IPRange, + "IPRange": v.IPRange, "Created": v.CreatedAt, "Region": v.RegionSlug, "Default": v.Default, diff --git a/commands/kubernetes_test.go b/commands/kubernetes_test.go index aa8eca207..8474752e9 100644 --- a/commands/kubernetes_test.go +++ b/commands/kubernetes_test.go @@ -72,7 +72,7 @@ var ( APIVersion: "v1", CurrentContext: "test-context", Contexts: map[string]*clientcmdapi.Context{ - "test-context": &clientcmdapi.Context{ + "test-context": { Cluster: "test-cluster", }, }, @@ -434,7 +434,7 @@ func TestKubernetesCreate(t *testing.T) { assert.NoError(t, err) // Test with 1-clicks specified - config.Doit.Set(config.NS, doctl.ArgOneClicks, []string{"slug1","slug2"}) + config.Doit.Set(config.NS, doctl.ArgOneClicks, []string{"slug1", "slug2"}) tm.kubernetes.EXPECT().Create(&r).Return(&testCluster, nil) tm.oneClick.EXPECT().InstallKubernetes(testCluster.ID, []string{"slug1", "slug2"}) err = testK8sCmdService().RunKubernetesClusterCreate("c-8", 3)(config) diff --git a/do/1_clicks.go b/do/1_clicks.go index b3d3aa0f7..41b9e944c 100644 --- a/do/1_clicks.go +++ b/do/1_clicks.go @@ -22,7 +22,7 @@ import ( // OneClickService is the godo OneClickService interface. type OneClickService interface { List(string) (OneClicks, error) - InstallKubernetes(string, []string)(string, error) + InstallKubernetes(string, []string) (string, error) } var _ OneClickService = &oneClickService{} @@ -77,16 +77,16 @@ func (ocs *oneClickService) List(oneClickType string) (OneClicks, error) { return list, nil } -func (ocs *oneClickService) InstallKubernetes(clusterUUID string, slugs []string)(string, error){ - installReq := &godo.InstallKubernetesAppsRequest { - Slugs: slugs, +func (ocs *oneClickService) InstallKubernetes(clusterUUID string, slugs []string) (string, error) { + installReq := &godo.InstallKubernetesAppsRequest{ + Slugs: slugs, ClusterUUID: clusterUUID, - } + } responseMessage, _, err := ocs.Client.OneClick.InstallKubernetes(context.TODO(), installReq) if err != nil { return "", err } - - return responseMessage.Message , nil + + return responseMessage.Message, nil } diff --git a/integration/kubernetes_clusters_create_test.go b/integration/kubernetes_clusters_create_test.go index fadb3843e..db069dbdf 100644 --- a/integration/kubernetes_clusters_create_test.go +++ b/integration/kubernetes_clusters_create_test.go @@ -300,4 +300,3 @@ current-context: some-context } ` ) - diff --git a/integration/registry_login_test.go b/integration/registry_login_test.go index 3e73c4e9a..8033c8ba7 100644 --- a/integration/registry_login_test.go +++ b/integration/registry_login_test.go @@ -93,7 +93,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) { expect.NoError(err) expect.Equal("Logging Docker in to registry.digitalocean.com\n", string(output)) - for host, _ := range dc.Auths { + for host := range dc.Auths { expect.Equal("registry.digitalocean.com", host) } }) @@ -128,7 +128,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) { expect.NoError(err) expect.Equal("Logging Docker in to registry.digitalocean.com\n", string(output)) - for host, _ := range dc.Auths { + for host := range dc.Auths { expect.Equal("expiring.registry.com", host) } }) diff --git a/integration/vpc_update_test.go b/integration/vpc_update_test.go index a51c1a1f8..4a831b1f3 100644 --- a/integration/vpc_update_test.go +++ b/integration/vpc_update_test.go @@ -109,4 +109,4 @@ ID URN } } ` -) \ No newline at end of file +)