You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
李光春
fe91ef400c
|
2 years ago | |
---|---|---|
.drone.yml | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
go.mod | 2 years ago | |
gopreg.go | 2 years ago | |
gopreg_test.go | 2 years ago | |
version.go | 2 years ago | |
version_test.go | 2 years ago |
README.md
Golang Verify
📦 Golang 手机号验证
安装
go get -v -u github.com/dtapps/goverify
使用
package main
import (
"github.com/dtapps/goverify"
"testing"
)
// TestChinaMobile 验证手机号码
func TestChinaMobile(t *testing.T) {
t.Log(goverify.ChinaMobile("13800138000"))
}
// TestChinaMobileNumber 验证中国移动手机号码
func TestChinaMobileNumber(t *testing.T) {
t.Log(goverify.ChinaMobileNumber("13800138000"))
}
// TestChinaUnicomNumber 验证中国联通手机号码
func TestChinaUnicomNumber(t *testing.T) {
t.Log(goverify.ChinaUnicomNumber("13800138000"))
}
// TestChinaTelecomNumber 验证中国电信手机号码
func TestChinaTelecomNumber(t *testing.T) {
t.Log(goverify.ChinaTelecomNumber("13800138000"))
}