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 0f32c54 commit 56c102f
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 {
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
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 {
func importClusterNodesToCM(ctx context.Context, nodes []k8scorev1.Node, clusterID string) error { // nolint
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 {
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
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 {
func importClusterInstances(info *cloudprovider.CloudDependBasicInfo) error { // nolint
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 {
func importClusterNodesToCM(ctx context.Context, workNodes []InstanceInfo, opt *cloudprovider.ListNodesOption) error { // nolint
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 {
func importClusterInstances(data *cloudprovider.CloudDependBasicInfo) error { // nolint
masterInfos, nodeInfos, err := getClusterInstancesByClusterID(data)
if err != nil {
return err
Expand Down

0 comments on commit 56c102f

Please sign in to comment.