Documentation ¶
Index ¶
- func CheckAndMakeDir(dir string, fileMode string) string
- func CreateAndWriteFile(fileName string, content string, fileMode string)
- func GetAllTables(db *sql.DB) []string
- func GetDb(dbType string, dbDn string) *sql.DB
- func GetFileContent(filePath string) []byte
- func GetPackageNameFromOutPutDir(outPutDir string) string
- func ReplaceFields(db *sql.DB, structStr string, packageName string, tableName string, ...) string
- func ReplaceStruct(structStr string, tablePrefix string, tableName string) (string, string)
- func StringMatchSlice(regTables []string, name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndMakeDir ¶
func CreateAndWriteFile ¶
Write structStr to model file
func GetAllTables ¶
func GetFileContent ¶
func ReplaceFields ¶
func ReplaceStruct ¶
Replace the tag {struct_name},{table_name}.
func StringMatchSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.