2021-11-21 01:46:15 +00:00
|
|
|
|
package arbitrary
|
|
|
|
|
|
|
|
|
|
// PhoneNumber returns an arbitrary phone‐number.
|
|
|
|
|
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
|
|
|
|
}
|