go-zero/tools/goctl/model/sql/template/import.go

32 lines
770 B
Go
Raw Normal View History

package template
2020-07-29 17:11:41 +08:00
var (
// Imports defines a import template for model in cache case
Imports = `import (
"database/sql"
"fmt"
2020-07-29 17:11:41 +08:00
"strings"
{{if .time}}"time"{{end}}
2020-07-29 17:11:41 +08:00
2021-11-15 21:02:11 +08:00
"github.com/tal-tech/go-zero/core/stores/builder"
"github.com/tal-tech/go-zero/core/stores/cache"
2020-08-08 16:40:10 +08:00
"github.com/tal-tech/go-zero/core/stores/sqlc"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/tal-tech/go-zero/core/stringx"
2020-07-29 17:11:41 +08:00
)
`
// ImportsNoCache defines a import template for model in normal case
ImportsNoCache = `import (
"database/sql"
"fmt"
"strings"
{{if .time}}"time"{{end}}
2021-11-15 21:02:11 +08:00
"github.com/tal-tech/go-zero/core/stores/builder"
"github.com/tal-tech/go-zero/core/stores/sqlc"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/tal-tech/go-zero/core/stringx"
)
`
)