Merge pull request '🚨 Fix linter error' (#45) from ada/fix-linter into main
Reviewed-on: #45
This commit is contained in:
commit
1958b44115
4 changed files with 5 additions and 7 deletions
|
@ -12,6 +12,8 @@ linters:
|
|||
- structcheck
|
||||
- exhaustivestruct
|
||||
- nosnakecase
|
||||
- gomnd
|
||||
- execinquery
|
||||
# Too extremist/unusable
|
||||
- depguard
|
||||
- varnamelen
|
||||
|
|
4
go.sum
4
go.sum
|
@ -10,11 +10,7 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
|||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
|
||||
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
||||
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
|
|
|
@ -99,7 +99,7 @@ func VerifyPassword(password string, hash string) (bool, error) {
|
|||
// parseHash parse existing encoded argon2id string.
|
||||
func parseHash(source string) (argon2idHash, config, error) {
|
||||
separateItem := strings.Split(source, "$")
|
||||
if len(separateItem) != 6 { //nolint:gomnd
|
||||
if len(separateItem) != 6 { //nolint:mnd
|
||||
return argon2idHash{}, config{}, &parseError{message: "Hash format is not valid"}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ func parseHash(source string) (argon2idHash, config, error) {
|
|||
}
|
||||
|
||||
separateParam := strings.Split(separateItem[3], ",")
|
||||
if len(separateParam) != 3 { //nolint:gomnd
|
||||
if len(separateParam) != 3 { //nolint:mnd
|
||||
return argon2idHash{}, config{}, &parseError{message: "Hash config is not valid"}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ func parseIntBeforeSeparator(source *string, sep string) (int, error) { // retur
|
|||
return 0, &parseIntBeforeSeparatorError{message: *source + ": format only take positive value"}
|
||||
}
|
||||
|
||||
if value > 99 { //nolint:gomnd
|
||||
if value > 99 { //nolint:mnd
|
||||
return 0, &parseIntBeforeSeparatorError{message: *source + ": Format only take two number"}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue