Documentation ¶
Index ¶
- Constants
- Variables
- func BigCamelCase(str string) string
- func FirstToUpper(str string) string
- func GetRand() *rand.Rand
- func GetRandomString(l int) string
- func GetRandomString2(l int) string
- func LittleCamelCase(str string) string
- func MakeYearDaysRand(sum int) string
- func RandSalt() string
- func Substr(str string, start int, length int) string
- func Substr2(str string, start int, end int) string
- type GonicMapper
Constants ¶
View Source
const (
SALT = "$^*#,.><)(_+f*m"
)
Variables ¶
View Source
var LintGonicMapper = GonicMapper{ "API": true, "ASCII": true, "CPU": true, "CSS": true, "DNS": true, "EOF": true, "GUID": true, "HTML": true, "HTTP": true, "HTTPS": true, "ID": true, "IP": true, "JSON": true, "LHS": true, "QPS": true, "RAM": true, "RHS": true, "RPC": true, "SLA": true, "SMTP": true, "SSH": true, "TLS": true, "TTL": true, "UI": true, "UID": true, "UUID": true, "URI": true, "URL": true, "UTF8": true, "VM": true, "XML": true, "XSRF": true, "XSS": true, }
Functions ¶
func Substr ¶
https://studygolang.com/articles/4287 截取字符串 start 起点下标 length 需要截取的长度
Types ¶
type GonicMapper ¶
GonicMapper implements IMapper. It will consider initialisms when mapping names. E.g. id -> ID, user -> Admin and to table names: UserID -> user_id, MyUID -> my_uid
func (GonicMapper) Obj2Table ¶
func (mapper GonicMapper) Obj2Table(name string) string
Click to show internal directories.
Click to hide internal directories.