import.go 900 B

1234567891011121314151617181920212223242526272829303132333435
  1. package template
  2. const (
  3. // Imports defines an 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. {{if .containsPQ}}"github.com/lib/pq"{{end}}
  11. "github.com/zeromicro/go-zero/core/stores/builder"
  12. "github.com/zeromicro/go-zero/core/stores/cache"
  13. "github.com/zeromicro/go-zero/core/stores/sqlc"
  14. "github.com/zeromicro/go-zero/core/stores/sqlx"
  15. "github.com/zeromicro/go-zero/core/stringx"
  16. )
  17. `
  18. // ImportsNoCache defines an import template for model in normal case
  19. ImportsNoCache = `import (
  20. "context"
  21. "database/sql"
  22. "fmt"
  23. "strings"
  24. {{if .time}}"time"{{end}}
  25. {{if .containsPQ}}"github.com/lib/pq"{{end}}
  26. "github.com/zeromicro/go-zero/core/stores/builder"
  27. "github.com/zeromicro/go-zero/core/stores/sqlc"
  28. "github.com/zeromicro/go-zero/core/stores/sqlx"
  29. "github.com/zeromicro/go-zero/core/stringx"
  30. )
  31. `
  32. )