random

package
v0.0.0-...-d50afe8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChineseName

func ChineseName() string

返回一个随机组成的中文姓名。

func EnglishName

func EnglishName() string

返回一个随机组成的英文姓名。

func HostName

func HostName() string

返回一个随机产生的hostname。

func Int

func Int(min int, max int) int

返回一个介于min和max之间的的int类型的随机数。

func Int64

func Int64(min int64, max int64) int64

返回一个介于min和max之间的int64类型的随机数。

func Name

func Name() string

返回一个随机组成的中文或英文姓名

以1/2的概率决定生产的是中文还是英文姓名。

func NumberString

func NumberString(min int, max int) string

返回一个介于min和max之间的string类型的随机数。

func NumberStringRepair

func NumberStringRepair(min int, max int) string

返回一个介于min和max之间的string类型的随机数

通过Int64生成一个随机数,当结果的字符串长度小于max的字符串长度的情况下,使用0在开头补齐。

Types

This section is empty.

Jump to

Keyboard shortcuts

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