Skip to content

Commit

Permalink
fix: 代码规范
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyudeqiu committed Nov 13, 2024
1 parent 56c102f commit 5c37ae0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func ImportClusterNodesTask(taskID string, stepName string) error {
return nil
}

func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint:unused
kubeConfig, err := encrypt.Decrypt(nil, data.Cluster.KubeConfig)
if err != nil {
return fmt.Errorf("decode kube config failed: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/Tencent/bk-bcs/bcs-services/bcs-cluster-manager/internal/common"
)

func importClusterNodesToCM(ctx context.Context, nodes []k8scorev1.Node, clusterID string) error { // nolint
func importClusterNodesToCM(ctx context.Context, nodes []k8scorev1.Node, clusterID string) error { // nolint:unused

Check failure on line 34 in bcs-services/bcs-cluster-manager/internal/cloudprovider/azure/tasks/utils.go

View workflow job for this annotation

GitHub Actions / bcs-cluster-manager

importClusterNodesToCM - result 0 (error) is always nil (unparam)
for _, n := range nodes {
innerIP := ""
for _, v := range n.Status.Addresses {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func importClusterCredential(ctx context.Context, data *cloudprovider.CloudDepen
return nil
}

func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint:unused
config, _ := encrypt.Decrypt(nil, data.Cluster.KubeConfig)
kubeRet := base64.StdEncoding.EncodeToString([]byte(config))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func ImportClusterNodesTask(taskID string, stepName string) error {
return nil
}

func importClusterInstances(info *cloudprovider.CloudDependBasicInfo) error { // nolint
func importClusterInstances(info *cloudprovider.CloudDependBasicInfo) error { // nolint:unused
kubeConfigByte, err := encrypt.Decrypt(nil, info.Cluster.KubeConfig)
if err != nil {
return fmt.Errorf("decode kube config failed: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func transInstanceIPToNodes(ipList []string, opt *cloudprovider.ListNodesOption)
return nodes, nil
}

func importClusterNodesToCM(ctx context.Context, workNodes []InstanceInfo, opt *cloudprovider.ListNodesOption) error { // nolint
func importClusterNodesToCM(ctx context.Context, workNodes []InstanceInfo, opt *cloudprovider.ListNodesOption) error { // nolint:unused

Check failure on line 79 in bcs-services/bcs-cluster-manager/internal/cloudprovider/qcloud-public/tasks/utils.go

View workflow job for this annotation

GitHub Actions / bcs-cluster-manager

line is 135 characters (lll)
var (
workerIps = make([]string, 0)
ipToInstanceMap = make(map[string]InstanceInfo, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func importClusterCredential(ctx context.Context, data *cloudprovider.CloudDepen
return nil
}

func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint:unused
masterInfos, nodeInfos, err := getClusterInstancesByClusterID(data)
if err != nil {
return err
Expand Down

0 comments on commit 5c37ae0

Please sign in to comment.