field

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 ColTypeSwapVal

func ColTypeSwapVal(colType string) *strings.Builder

num(2):1-3 将字段类型转化为具体值

func Desc

func Desc(name string, length int, def string, probability int) string

num(2):1-3

func DescDef

func DescDef(name, def string) string

func DescIndex

func DescIndex(name string, length int) string

func DescName

func DescName(name string) string

func Init

func Init()

func RInt

func RInt(n int) int

func RegisterOpts

func RegisterOpts(opts OptInterfcae)

func Value

func Value(colType string, index int, val *strings.Builder) *strings.Builder

根据类型返回具体的值

Types

type OptInterfcae

type OptInterfcae interface {
	Name() string // 表示的是标识
	Types() int
	Fu() interface{}
}

Jump to

Keyboard shortcuts

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