fix(goctl): fix redundant import (#2551)
This commit is contained in:
@@ -9,6 +9,7 @@ const (
|
||||
"strings"
|
||||
{{if .time}}"time"{{end}}
|
||||
|
||||
{{if .containsPQ}}"github.com/lib/pq"{{end}}
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
@@ -24,6 +25,7 @@ const (
|
||||
"strings"
|
||||
{{if .time}}"time"{{end}}
|
||||
|
||||
{{if .containsPQ}}"github.com/lib/pq"{{end}}
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user