import.go 803 B

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