go-arbitrary/default.go

49 lines
931 B
Go
Raw Normal View History

2021-11-21 01:05:20 +00:00
package arbitrary
import (
"math/rand"
"time"
)
var (
Default = New( rand.NewSource( time.Now().UTC().UnixNano() ) )
)
2021-11-21 01:46:15 +00:00
// Bool returns an arbitrary bool.
2021-11-21 01:05:20 +00:00
func Bool() bool {
return Default.Bool()
}
2021-11-22 19:50:54 +00:00
// Password returns an arbitrary password.
func Password() string {
return Default.Password()
}
2021-11-21 01:46:15 +00:00
// PhoneNumber returns an arbitrary phonenumber.
2021-11-22 18:07:00 +00:00
//
// Some example phonenumber include:
//
// 289-5625421
// (604) 585-1234
// ٠٩٦-٣٦١-٦٦٧٦
// 613/978-1920
// +20-13-004-6453
// (782) 440 6832
// +٢٠-٩٣-٧٤٨-٧٩٨١
// 093-340-0709
// +1-403-870-6449
// +18250827424
//
// (Note that there are other phonenumber formats too, in addition to the formats that are implied by the examples provided here.)
2021-11-21 01:46:15 +00:00
func PhoneNumber() string {
return Default.PhoneNumber()
}
2021-11-21 01:05:20 +00:00
func Runes(a ...interface{}) []rune {
return Default.Runes(a...)
}
func String(a ...interface{}) string {
return Default.String(a...)
}