Compare commits

...

3 commits

Author SHA1 Message Date
Ada
1958b44115 Merge pull request '🚨 Fix linter error' (#45) from ada/fix-linter into main
Some checks failed
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint Pipeline was successful
Reviewed-on: #45
2024-05-10 23:08:37 +00:00
c2778c178a Merge branch 'main' into ada/fix-linter
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/release Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/build Pipeline was successful
ci/woodpecker/pull_request_closed/release Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
2024-05-10 23:08:19 +00:00
Ada
af9b589627
🚨 Fix linter error
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/release Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
2024-05-11 00:49:01 +02:00
4 changed files with 5 additions and 7 deletions

View file

@ -12,6 +12,8 @@ linters:
- structcheck
- exhaustivestruct
- nosnakecase
- gomnd
- execinquery
# Too extremist/unusable
- depguard
- varnamelen

4
go.sum
View file

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

View file

@ -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"}
}

View file

@ -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"}
}