go-arbitrary/t_phonenumber.go

15 lines
269 B
Go
Raw Permalink Normal View History

2021-11-21 01:46:15 +00:00
package arbitrary
// PhoneNumber returns an arbitrary phonenumber.
func (arb T) PhoneNumber() string {
2021-11-21 16:27:42 +00:00
var funcs []func()string = []func()string{
arb.phonenumber_canada,
2021-11-22 16:48:48 +00:00
arb.phonenumber_egypt,
2021-11-21 16:27:42 +00:00
}
fn := funcs[arb.randomness.Intn(len(funcs))]
return fn()
2021-11-21 01:46:15 +00:00
}