diff --git a/internal/domain/domaintest/version.go b/internal/domain/domaintest/version.go index 6657589..f23e8d9 100644 --- a/internal/domain/domaintest/version.go +++ b/internal/domain/domaintest/version.go @@ -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) -} diff --git a/internal/domain/version.go b/internal/domain/version.go index c8bc69b..bcc03b7 100644 --- a/internal/domain/version.go +++ b/internal/domain/version.go @@ -12,7 +12,7 @@ type Version struct { timezone string } -var versionModelName = "Version" +const versionModelName = "Version" // UnmarshalVersionFromDatabase unmarshals Version from the database. // diff --git a/internal/port/handler_http_api_error.go b/internal/port/handler_http_api_error.go index 79cc130..9fb081f 100644 --- a/internal/port/handler_http_api_error.go +++ b/internal/port/handler_http_api_error.go @@ -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 }