You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/model/sql/template/import.go

47 lines
1.1 KiB
Go

package template
4 years ago
var (
// Imports defines a import template for model in cache case
Imports = `import (
"context"
"database/sql"
"fmt"
4 years ago
"strings"
{{if .time}}"time"{{end}}
4 years ago
"github.com/zeromicro/go-zero/core/stores/builder"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlc"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/stringx"
4 years ago
)
`
// ImportsNoCache defines a import template for model in normal case
ImportsNoCache = `import (
"context"
"database/sql"
"fmt"
"strings"
{{if .time}}"time"{{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"
"github.com/zeromicro/go-zero/core/stringx"
)
`
// pg
ImportsNoCachePg = `import (
"context"
"fmt"
"strings"
{{if .time}}"time"{{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"
"github.com/zeromicro/go-zero/core/stringx"
)
`
)