import.go 792 B

12345678910111213141516171819202122232425262728293031
  1. package template
  2. var (
  3. // Imports defines a import template for model in cache case
  4. Imports = `import (
  5. "database/sql"
  6. "fmt"
  7. "strings"
  8. {{if .time}}"time"{{end}}
  9. "github.com/tal-tech/go-zero/core/stores/cache"
  10. "github.com/tal-tech/go-zero/core/stores/sqlc"
  11. "github.com/tal-tech/go-zero/core/stores/sqlx"
  12. "github.com/tal-tech/go-zero/core/stringx"
  13. "github.com/tal-tech/go-zero/tools/goctl/model/sql/builderx"
  14. )
  15. `
  16. // ImportsNoCache defines a import template for model in normal case
  17. ImportsNoCache = `import (
  18. "database/sql"
  19. "fmt"
  20. "strings"
  21. {{if .time}}"time"{{end}}
  22. "github.com/tal-tech/go-zero/core/stores/sqlc"
  23. "github.com/tal-tech/go-zero/core/stores/sqlx"
  24. "github.com/tal-tech/go-zero/core/stringx"
  25. "github.com/tal-tech/go-zero/tools/goctl/model/sql/builderx"
  26. )
  27. `
  28. )