Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复golangci-lint规范问题 #3492

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading