refactor: versionModelName should be const, not var
This commit is contained in:
parent
21e530aa0f
commit
68b715306d
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ type Version struct {
|
|||
timezone string
|
||||
}
|
||||
|
||||
var versionModelName = "Version"
|
||||
const versionModelName = "Version"
|
||||
|
||||
// UnmarshalVersionFromDatabase unmarshals Version from the database.
|
||||
//
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue