Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomQSlice ¶
从一个slice里面,根据权重,随机出value
可以重复的参数比不可重复效率略高
list := []struct{int32,interface{}}
切记不要修改返回值里面的内容
Types ¶
type Rand ¶
type Rand struct {
// contains filtered or unexported fields
}
func (Rand) RandomQSlice ¶
从一个slice里面,根据权重,随机出value
可以重复的参数比不可重复效率略高
list := []struct{int32,interface{}}
切记不要修改返回值里面的内容
Click to show internal directories.
Click to hide internal directories.