fix: update code for golangci-lint varcheck (#17045)

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
This commit is contained in:
Shengwen YU 2022-06-21 16:56:36 +08:00 committed by GitHub
parent 541fbe784f
commit 44bfb992f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -41,7 +41,7 @@ linters:
# - unconvert
# - unparam
# - unused
# - varcheck
- varcheck
run:
skip-files:

View File

@ -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 {

View File

@ -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() {