Documentation ¶
Index ¶
- Constants
- Variables
- func CamelCase(s string) string
- func DBMap(columns []string, rows *sql.Rows) ([]interface{}, error)
- func Gzip(str string) string
- func IsFileExist(filepath string) bool
- func LoadResource(dir string) map[string]string
- func MapDBType(t string) string
- func NewTplFunction() template.FuncMap
- func ReadFile(f string) []byte
- func RemoveTablePrefix(s string) string
- func SnakeCase(s string) string
- func Ucfirst(str string) string
- func UnGzip(str string) string
- type DBModel
- type MyDB
- type SysConfig
Constants ¶
View Source
const SYS_CONFIG_PATH = "/application.yaml" //全局配置文件
Variables ¶
View Source
var (
DBTypeMap = map[string]string{
"string": "varchar,char,text,tinytext,mediumtext",
"int": "int,tinyint,smallint,mediumint,integer,year,boolean",
"int64": "bigint,datetime,timestamp",
"bool": "bit",
"float": "float,double,decimal",
"[]byte": "blob,longblob,mediumblob",
"time.Time": "date,time",
}
)
View Source
var WorkDir string
Functions ¶
func LoadResource ¶
遍历文件夹,把静态文件读取出来 map["SERVICE_TPL"]=文件里面的内容
func RemoveTablePrefix ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.