Skip to content

Commit

Permalink
fixed issue reporte from gosimple code checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo committed Aug 23, 2018
1 parent 733cf88 commit a7bdad0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func waitAction(ctx context.Context, client *hcloud.Client, action *hcloud.Actio
switch action.Status {
case hcloud.ActionStatusRunning:
sendProgress(action.Progress)
break

case hcloud.ActionStatusSuccess:
sendProgress(100)
errCh <- nil
Expand Down
3 changes: 1 addition & 2 deletions pkg/hetzner/hetzner_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ func (provider *Provider) CreateNodes(suffix string, template clustermanager.Nod

var nodes []clustermanager.Node
for i := 1; i <= count; i++ {
var serverOpts hcloud.ServerCreateOpts
serverOpts = serverOptsTemplate
serverOpts := serverOptsTemplate
nodeNumber := i + offset
serverOpts.Name = strings.Replace(serverNameTemplate, "@idx", fmt.Sprintf("%.02d", nodeNumber), 1)
serverOpts.Datacenter = &hcloud.Datacenter{
Expand Down
2 changes: 1 addition & 1 deletion pkg/hetzner/hetzner_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestProviderGetMasterNodeIsMissing(t *testing.T) {
func TestProviderInitCluster(t *testing.T) {
provider := getProviderWithNodes([]clustermanager.Node{})

provider.InitCluster("cluster-name", "10.0.1.0/24")
_, err = provider.GetMasterNode()

if provider.GetNodeCidr() != "10.0.1.0/24" {
t.Error("cluster node cidr is not correctly set")
Expand Down
2 changes: 1 addition & 1 deletion pkg/hetzner/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func waitAction(ctx context.Context, client *hcloud.Client, action *hcloud.Actio
switch action.Status {
case hcloud.ActionStatusRunning:
sendProgress(action.Progress)
break

case hcloud.ActionStatusSuccess:
sendProgress(100)
errCh <- nil
Expand Down

0 comments on commit a7bdad0

Please sign in to comment.