fix(goctl): Fix issues (#2543)

* fix #2541

* fix #2432

* Fix review comment

* foramt code

* foramt code
This commit is contained in:
anqiansong
2022-10-22 21:01:15 +08:00
committed by GitHub
parent bbadbe0175
commit 7c9ef3ca67
2 changed files with 21 additions and 1 deletions

View File

@@ -10,11 +10,16 @@ import (
const ModelCustom = `package {{.pkg}}
{{if .withCache}}
import (
"github.com/lib/pq"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
{{else}}
import "github.com/zeromicro/go-zero/core/stores/sqlx"
import (
"github.com/lib/pq"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
{{end}}
var _ {{.upperStartCamelObject}}Model = (*custom{{.upperStartCamelObject}}Model)(nil)