Documentation ¶
Index ¶
- Constants
- Variables
- func ColTypeSwapVal(colType string) *strings.Builder
- func Desc(name string, length int, def string, probability int) string
- func DescDef(name, def string) string
- func DescIndex(name string, length int) string
- func DescName(name string) string
- func Init()
- func RInt(n int) int
- func RegisterOpts(opts OptInterfcae)
- func Value(colType string, index int, val *strings.Builder) *strings.Builder
- type OptInterfcae
Constants ¶
View Source
const ( FuParamNil = iota // 默认不传参 FuParamOne // 传参int类型 )
Variables ¶
View Source
var ( OptsN = make(map[string]func() string, 0) // 没有自定长度的 OptsI = make(map[string]func(int) string, 0) // 自定义长度的方法 OptsT = make(map[string]int, 0) )
View Source
var Address = new(address)
View Source
var BankID = new(bankID)
View Source
var Birthdate = new(birthdate)
View Source
var Cart = new(cart)
View Source
var Char = new(char)
随机生成固定范围的char
View Source
var Chinese = new(chinese)
返回中文
View Source
var City = new(city)
返回城市地址
View Source
var Email = new(email)
View Source
var English = new(english)
返回英文字符串
View Source
var HashPassword = new(hashPassword)
View Source
var Name = new(name)
View Source
var Num = new(num)
返回int数据
View Source
var OrderNo = new(orderNo)
View Source
var Phone = new(phone)
View Source
var RRDecimal = &rdecimal{
exp: -2,
}
随机生成钱
View Source
var Wuid = new(wuids)
Functions ¶
func RegisterOpts ¶
func RegisterOpts(opts OptInterfcae)
Types ¶
type OptInterfcae ¶
Click to show internal directories.
Click to hide internal directories.