Skip to content

Commit

Permalink
style(autok3s): remove useless code
Browse files Browse the repository at this point in the history
Signed-off-by: Jason-ZW <zhenyang@rancher.com>
  • Loading branch information
rancher-sy-bot committed Dec 18, 2020
1 parent c2446f8 commit 30fbc75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions pkg/providers/alibaba/alibaba.go
Expand Up @@ -1254,7 +1254,7 @@ func (p *Alibaba) generateInstance(fn checkFun, ssh *types.SSH) (*types.Cluster,

func (p *Alibaba) assignEIPToInstance(num int, master bool) ([]string, error) {
var e error
eipIds := []string{}
eipIds := make([]string, 0)
eips, err := p.allocateEipAddresses(num)
if err != nil {
return nil, err
Expand All @@ -1278,9 +1278,6 @@ func (p *Alibaba) assignEIPToInstance(num int, master bool) ([]string, error) {
}
return true
})
if err != nil {
return nil, err
}
p.logger.Debugf("[%s] associated %d eip(s) for instance(s) successfully\n", p.GetProviderName(), num)
}

Expand Down Expand Up @@ -1613,7 +1610,7 @@ func (p *Alibaba) configDefaultSecurityPermissions(sg *ecs.DescribeSecurityGroup
}
}

perms := []ecs.Permission{}
perms := make([]ecs.Permission, 0)

if !hasSSHPort {
perms = append(perms, ecs.Permission{
Expand Down
3 changes: 0 additions & 3 deletions pkg/providers/tencent/tencent.go
Expand Up @@ -1589,9 +1589,6 @@ func (p *Tencent) allocateEIPForInstance(num int, master bool) ([]uint64, error)
}
return true
})
if err != nil {
return nil, err
}
p.logger.Debugf("[%s] successfully associated %d eip(s) for instance(s)\n", p.GetProviderName(), num)
}

Expand Down

0 comments on commit 30fbc75

Please sign in to comment.