Skip to content

Commit

Permalink
修复golangci-lint规范问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dove0012 committed Sep 4, 2024
1 parent 29fc165 commit 8c1ccd8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func (t *Task) BuildCreateNodeGroupTask(group *proto.NodeGroup, opt *cloudprovid

// BuildCleanNodesInGroupTask clean specified nodes in NodeGroup
// including remove nodes from NodeGroup, clean data in nodes
func (t *Task) BuildCleanNodesInGroupTask(nodes []*proto.Node, group *proto.NodeGroup,
func (t *Task) BuildCleanNodesInGroupTask(nodes []*proto.Node, group *proto.NodeGroup, // nolint
opt *cloudprovider.CleanNodesOption) (*proto.Task, error) {
// clean nodeGroup nodes in cloud only has two steps:
// 1. call asg RemoveInstances to clean cluster nodes
Expand Down Expand Up @@ -580,7 +580,7 @@ func (t *Task) BuildMoveNodesToGroupTask(nodes []*proto.Node, group *proto.NodeG
}

// BuildUpdateDesiredNodesTask build update desired nodes task
func (t *Task) BuildUpdateDesiredNodesTask(desired uint32, group *proto.NodeGroup,
func (t *Task) BuildUpdateDesiredNodesTask(desired uint32, group *proto.NodeGroup, // nolint
opt *cloudprovider.UpdateDesiredNodeOption) (*proto.Task, error) {
// validate request params
if desired == 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ func CheckClusterNodesStatusTask(taskID string, stepName string) error {
return nil
}

func checkClusterInstanceStatus(ctx context.Context, info *cloudprovider.CloudDependBasicInfo,
instanceNames []string) ([]string, []string, []string, error) { // nolint
func checkClusterInstanceStatus(ctx context.Context, info *cloudprovider.CloudDependBasicInfo, // nolint
instanceNames []string) ([]string, []string, []string, error) {
var (
addSuccessNodes = make([]string, 0)
addFailureNodes = make([]string, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func setModuleInfo(group *proto.NodeGroup, bkBizIDString string) {
}
}

func getClusterResourceGroup(cls *proto.Cluster) string {
func getClusterResourceGroup(cls *proto.Cluster) string { // nolint
if cls.GetExtraInfo() == nil {
return ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (ng *NodeGroup) SwitchAutoScalingOptionStatus(scalingOption *proto.ClusterA
}

// CheckResourcePoolQuota check resource pool quota when revise group limit
func (ng *NodeGroup) CheckResourcePoolQuota(group *proto.NodeGroup, scaleUpNum uint32) error {
func (ng *NodeGroup) CheckResourcePoolQuota(group *proto.NodeGroup, scaleUpNum uint32) error { // nolint
cloud, err := cloudprovider.GetCloudByProvider(cloudName)
if err == nil && cloud.GetConfInfo().GetDisableCheckGroupResource() {
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (nm *NodeManager) ListNodeInstanceType(info cloudprovider.InstanceInfo, opt
}

// getInnerInstanceTypes get inner instance types info
func (nm *NodeManager) getInnerInstanceTypes(info cloudprovider.InstanceInfo) (
func (nm *NodeManager) getInnerInstanceTypes(info cloudprovider.InstanceInfo) ( // nolint
[]*proto.InstanceType, error) {
blog.Infof("getInnerInstanceTypes %+v", info)

Expand Down
2 changes: 1 addition & 1 deletion bcs-services/bcs-cluster-manager/internal/daemon/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ package daemon

import (
"fmt"
"github.com/Tencent/bk-bcs/bcs-common/common/blog"

"github.com/Tencent/bk-bcs/bcs-common/common/blog"
gocache "github.com/patrickmn/go-cache"

"github.com/Tencent/bk-bcs/bcs-services/bcs-cluster-manager/internal/remote/cache"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (cc *ClientConfig) getAccessToken(clientAuth *auth.ClientAuth) (string, err
}

var (
appToken = ""
appToken string
err error
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const (
usedQuota = "usedQuota"
availableQuota = "availableQuota"
// OverSold ratio
OverSold = "oversold"
OverSold = "oversold"
)

// PoolLabel xxx
Expand Down

0 comments on commit 8c1ccd8

Please sign in to comment.