fix: fix all lint warning in pkg (#1263)

* fix:fix lint errors in internal

* fix:fix lint error in interal/tools

* fix: fix lint errros  in pkg/statics

* fix: fix lint erros in pkg/authverify,pkg/rpcclien

* fix: fix lint erros in pkg/common/cmd

* fix: fix lint erros in pkg/common/config,convert

* fix: fix lint erros in pkg/common/db/cache

* fix: fix lint errors in pkg/common/db/controller

* fix:fix lint errors in pkg/common/db/relation
and pkg/common/db/localcache

* fix: fix rest lint errors in pkg/common/db

* fix: fix rest lint errors in pkg

* fix:set back go.work to use go 1.19
This commit is contained in:
CNCSMonster
2023-10-23 16:24:55 +08:00
committed by GitHub
parent ba190fde13
commit b1415473ff
91 changed files with 1617 additions and 855 deletions
+4 -3
View File
@@ -69,9 +69,9 @@ func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformI
}
}
if len(deleteTokenKey) != 0 {
err := a.cache.DeleteTokenByUidPid(ctx, userID, platformID, deleteTokenKey)
if err != nil {
return "", err
err2 := a.cache.DeleteTokenByUidPid(ctx, userID, platformID, deleteTokenKey)
if err2 != nil {
return "", err2
}
}
claims := tokenverify.BuildClaims(userID, platformID, a.accessExpire)
@@ -80,5 +80,6 @@ func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformI
if err != nil {
return "", utils.Wrap(err, "")
}
return tokenString, a.cache.AddTokenFlag(ctx, userID, platformID, tokenString, constant.NormalToken)
}