| 12345678910111213141516171819202122232425 |
- package utl
- import (
- "testing"
- )
- func TestIsPhone(t *testing.T) {
- phones := []string{
- "137234510452",
- "12398765434",
- "13604550543",
- "13456786543",
- "16703440355",
- "19100001111",
- "19200001111",
- }
- for _, phone := range phones {
- b := IsPhoneSimple(phone)
- t.Log(phone, "=", b)
- bs := IsPhone(phone)
- t.Log(phone, "=", bs)
- }
- }
|