core

package
v0.0.0-...-053c7d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndMakeDir

func CheckAndMakeDir(dir string, fileMode string) string

func CreateAndWriteFile

func CreateAndWriteFile(fileName string, content string, fileMode string)

Write structStr to model file

func GetAllTables

func GetAllTables(db *sql.DB) []string

func GetDb

func GetDb(dbType string, dbDn string) *sql.DB

func GetFileContent

func GetFileContent(filePath string) []byte

func GetPackageNameFromOutPutDir

func GetPackageNameFromOutPutDir(outPutDir string) string

func ReplaceFields

func ReplaceFields(db *sql.DB, structStr string, packageName string, tableName string, excludeFields string) string

func ReplaceStruct

func ReplaceStruct(structStr string, tablePrefix string, tableName string) (string, string)

Replace the tag {struct_name},{table_name}.

func StringMatchSlice

func StringMatchSlice(regTables []string, name string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL