MSP-3427 linter fixes

This commit is contained in:
Tim committed 2024-06-13 17:08:10 +03:00
1 parent a7ec10fa39
commit 1f232c4271
8 files changed
+19 -15

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ func NewToken(tokenRep TokenRep, lifeTimeInSec int) Token {
}
func (s Token) GenerateToken(ctx context.Context, repo TokenSaver, id int64) (string, string, error) {
cryptoRand := make([]byte, 128) //nolint:gomnd
cryptoRand := make([]byte, 128) //nolint:mnd
_, err := rand.Read(cryptoRand)
if err != nil {
return "", "", errors.WithMessage(err, "crypto/rand read")
+1 -1
View File
@@ -388,7 +388,7 @@ func (u User) Block(ctx context.Context, adminId int64, userId int) error {
//nolint:gomnd
func (u User) cryptPassword(password string) (string, error) {
passwordBytes, err := bcrypt.GenerateFromPassword([]byte(password), 12)
passwordBytes, err := bcrypt.GenerateFromPassword([]byte(password), 12) //nolint:mnd
if err != nil {
return "", errors.WithMessage(err, "gen bcrypt from password")
}