go-arbitrary/default.go

44 lines
833 B
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package arbitrary
import (
"math/rand"
"time"
)
var (
Default = New( rand.NewSource( time.Now().UTC().UnixNano() ) )
)
// Bool returns an arbitrary bool.
func Bool() bool {
return Default.Bool()
}
// PhoneNumber returns an arbitrary phonenumber.
//
// 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.)
func PhoneNumber() string {
return Default.PhoneNumber()
}
func Runes(a ...interface{}) []rune {
return Default.Runes(a...)
}
func String(a ...interface{}) string {
return Default.String(a...)
}