fix(goctl): fix redundant import (#2551)

This commit is contained in:
anqiansong
2022-10-25 06:58:51 +08:00
committed by GitHub
parent ce73b9a85c
commit 9504d30049
6 changed files with 24 additions and 16 deletions

View File

@@ -10,16 +10,12 @@ 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/lib/pq"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
import "github.com/zeromicro/go-zero/core/stores/sqlx"
{{end}}
var _ {{.upperStartCamelObject}}Model = (*custom{{.upperStartCamelObject}}Model)(nil)