diff --git a/get.go b/get.go new file mode 100644 index 0000000..8ab6766 --- /dev/null +++ b/get.go @@ -0,0 +1,15 @@ +package goverify + +// 功能类型 +var typeName = map[string]string{ + Mobile: "移动", + Unicom: "联通", + Telecom: "电信", + Broadnet: "广电", + Virtual: "虚拟", +} + +// GetTypeName 获取运营商类型名称 +func GetTypeName(Type string) string { + return typeName[Type] +} diff --git a/get_test.go b/get_test.go new file mode 100644 index 0000000..bf13aa4 --- /dev/null +++ b/get_test.go @@ -0,0 +1,7 @@ +package goverify + +import "testing" + +func TestGetTypeName(t *testing.T) { + t.Log(GetTypeName(Mobile)) +} diff --git a/version.go b/version.go index 3fd86bd..80a395d 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package goverify -const Version = "1.0.5" +const Version = "1.0.6"