mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-26 11:28:46 +08:00
e6ef1fca12
* optimized markdown generator * optimized markdown generator * optimized markdown generator * add more comment * add comment * add comment * add comments for rpc tool * add comments for model tool * add comments for model tool * add comments for model tool * add comments for config tool * add comments for config tool * add comments * add comments * add comments * add comments * add comment * remove rpc main head info * add comment * optimized Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
32 lines
792 B
Go
32 lines
792 B
Go
package template
|
|
|
|
var (
|
|
// Imports defines a import template for model in cache case
|
|
Imports = `import (
|
|
"database/sql"
|
|
"fmt"
|
|
"strings"
|
|
{{if .time}}"time"{{end}}
|
|
|
|
"github.com/tal-tech/go-zero/core/stores/cache"
|
|
"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"
|
|
"github.com/tal-tech/go-zero/tools/goctl/model/sql/builderx"
|
|
)
|
|
`
|
|
// ImportsNoCache defines a import template for model in normal case
|
|
ImportsNoCache = `import (
|
|
"database/sql"
|
|
"fmt"
|
|
"strings"
|
|
{{if .time}}"time"{{end}}
|
|
|
|
"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"
|
|
"github.com/tal-tech/go-zero/tools/goctl/model/sql/builderx"
|
|
)
|
|
`
|
|
)
|