Skip to content

Commit

Permalink
feat: 冲突golangci-lint修复
Browse files Browse the repository at this point in the history
  • Loading branch information
LidolLxf committed Dec 3, 2024
1 parent 87e4587 commit 9787543
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cmdb
import (
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"strconv"
"time"
Expand Down Expand Up @@ -149,7 +150,7 @@ func (t *TClient) QueryBusinessLevel2DetailInfo(bizL2ID int) (*BusinessL2Info, e

if respData.Code != "0" {
blog.Errorf("call api queryBusinessLevel2DetailInfo[%s] failed: %v", respData.TraceID, respData.Message)
return nil, fmt.Errorf(respData.Message)
return nil, errors.New(respData.Message)
}
// successfully request
blog.Infof("call api queryBusinessLevel2DetailInfo with url(%s) successfully", reqURL)
Expand Down Expand Up @@ -201,7 +202,7 @@ func (t *TClient) queryServerInfoByIps(ips []string) ([]Server, error) {

if respData.Code != "0" {
blog.Errorf("call api queryAllServerByBaseCondition[%s] failed: %v", respData.TraceID, respData.Message)
return nil, fmt.Errorf(respData.Message)
return nil, errors.New(respData.Message)
}
// successfully request
blog.Infof("call api queryAllServerByBaseCondition with url(%s) successfully", reqURL)
Expand Down
14 changes: 7 additions & 7 deletions bcs-services/bcs-cluster-manager/internal/remote/cmdb/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ func (c Condition) String() string {

var (
and Condition = "AND"
or Condition = "OR"
in Condition = "IN"// nolint
or Condition = "OR" // nolint: unused
in Condition = "IN" // nolint
)

// Page page
Expand Down Expand Up @@ -297,11 +297,11 @@ type HostDetailData struct {
}

const (
keyBizID = "BsiId"
keySvrIP = "SvrIp"
methodBusiness = "Business"
methodServer = "Server"
methodBusinessRaw = "BusinessRaw"
keyBizID = "BsiId" // nolint: unused
keySvrIP = "SvrIp" // nolint: unused
methodBusiness = "Business" // nolint: unused
methodServer = "Server" // nolint: unused
methodBusinessRaw = "BusinessRaw" // nolint: unused
)

// BizInfo business id info
Expand Down

0 comments on commit 9787543

Please sign in to comment.