[go: nahoru, domu]

Skip to content

Commit

Permalink
fix: update code for golangci-lint varcheck (goharbor#17045)
Browse files Browse the repository at this point in the history
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
  • Loading branch information
zyyw committed Jun 21, 2022
1 parent 541fbe7 commit 44bfb99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ linters:
# - unconvert
# - unparam
# - unused
# - varcheck
- varcheck

run:
skip-files:
Expand Down
5 changes: 2 additions & 3 deletions src/pkg/reg/adapter/aliacr/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package aliacr
import "time"

const (
defaultTemporaryTokenExpiredTime = time.Hour * 1 // nolint:deadcode
registryEndpointTpl = "https://registry.%s.aliyuncs.com"
endpointTpl = "cr.%s.aliyuncs.com"
registryEndpointTpl = "https://registry.%s.aliyuncs.com"
endpointTpl = "cr.%s.aliyuncs.com"
)

type authorizationToken struct {
Expand Down
3 changes: 1 addition & 2 deletions src/pkg/reg/adapter/tencentcr/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import (
)

var (
errInvalidTcrEndpoint error = errors.New("[tencent-tcr.newAdapter] Invalid TCR instance endpoint")
errPingTcrEndpointFailed error = errors.New("[tencent-tcr.newAdapter] Ping TCR instance endpoint failed") // nolint:deadcode
errInvalidTcrEndpoint error = errors.New("[tencent-tcr.newAdapter] Invalid TCR instance endpoint")
)

func init() {
Expand Down

0 comments on commit 44bfb99

Please sign in to comment.