Documentation ¶
Index ¶
- func Bool() bool
- func Bytes(n int) []byte
- func Color() color.Color
- func CopySlice(s interface{}) interface{}
- func Int() int
- func Int32() int32
- func Int32N(n int) int32
- func Int64() int64
- func Int64Between(min, max int64) (v int64)
- func Int64N(n int64) int64
- func IntBetween(min, max int) int
- func IntN(n int) int
- func Shuffle(slice interface{})
- func ShuffleSs(a []string) []string
- func String(n int, letters ...string) string
- func Time() time.Time
- func TimeBetween(min, max time.Time) time.Time
- func Uint64() (v uint64)
- func Uint64N(n int64) uint64
- type ImgConfig
- type RandomImageResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64Between ¶
func IntBetween ¶
func Shuffle ¶
func Shuffle(slice interface{})
Shuffle pseudo-randomizes the order of elements using the default Source. https://stackoverflow.com/questions/12264789/shuffle-array-in-go
Types ¶
type ImgConfig ¶
func (*ImgConfig) Gen ¶
Gen generate a random image with imageFormat (jpg/png) . refer: https://onlinejpgtools.com/generate-random-jpg
type RandomImageResult ¶
func RandomImage ¶
func RandomImage(prefix string) (*RandomImageResult, error)
RandomImage creates a random image. Environment variables supported: GG_IMG_FAST=Y/N to enable fast mode or not GG_IMG_FORMAT=jpg/png to choose the format GG_IMG_FILE_SIZE=10M to set image file size GG_IMG_SIZE=640x320 to set the {width}x{height} of image
Click to show internal directories.
Click to hide internal directories.