12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package template
- var (
- // Imports defines a import template for model in cache case
- Imports = `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/cache"
- "github.com/zeromicro/go-zero/core/stores/sqlc"
- "github.com/zeromicro/go-zero/core/stores/sqlx"
- "github.com/zeromicro/go-zero/core/stringx"
- )
- `
- // 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"
- )
- `
- )
|