Documentation ¶
Index ¶
- func CleanUpGeneratedFiles(dir string) error
- func DirExists(path string) (bool, error)
- func EnsureDirPath(dirPath string) error
- func FormatTimestamp(t time.Time) []byte
- func GenerateTemplate(templateText string, templateData interface{}) ([]byte, error)
- func IsNil(v interface{}) bool
- func SaveGoFile(dirPath, fileName string, text []byte) error
- func ToGoFileName(databaseIdentifier string) string
- func ToGoIdentifier(databaseIdentifier string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUpGeneratedFiles ¶
CleanUpGeneratedFiles deletes everything at folder dir.
func EnsureDirPath ¶
EnsureDirPath ensures dir path exists. If path does not exist, creates new path.
func FormatTimestamp ¶
FormatTimestamp formats t into Postgres' text format for timestamps. From: github.com/lib/pq
func GenerateTemplate ¶
GenerateTemplate generates template with template text and template data.
func SaveGoFile ¶
SaveGoFile saves go file at folder dir, with name fileName and contents text.
func ToGoFileName ¶
ToGoFileName converts database identifier to Go file name.
func ToGoIdentifier ¶
ToGoIdentifier converts database to Go identifier.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.