refactor: versionModelName should be const, not var
ci/woodpecker/push/govulncheck Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/cron/govulncheck Pipeline was successful Details

This commit is contained in:
Dawid Wysokiński 2024-04-09 07:51:20 +02:00
parent 21e530aa0f
commit 68b715306d
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
3 changed files with 5 additions and 6 deletions

View File

@ -6,6 +6,10 @@ import (
"github.com/stretchr/testify/require"
)
func RandVersionCode() string {
return gofakeit.LetterN(2)
}
type VersionCursorConfig struct {
Code string
}
@ -52,7 +56,3 @@ func NewVersion(tb TestingTB, opts ...func(cfg *VersionConfig)) domain.Version {
return v
}
func RandVersionCode() string {
return gofakeit.LetterN(2)
}

View File

@ -12,7 +12,7 @@ type Version struct {
timezone string
}
var versionModelName = "Version"
const versionModelName = "Version"
// UnmarshalVersionFromDatabase unmarshals Version from the database.
//

View File

@ -148,7 +148,6 @@ func (re apiErrorRenderer) domainErrorToAPIError(domainErr domain.Error) apiErro
var err error = domainErr
for {
var withPath domain.ErrorWithPath
if !errors.As(err, &withPath) {
break
}