Documentation ¶
Index ¶
- Constants
- func AddAreaCode(countryCode string, phone string) string
- func AutoAddAreaCode(areaCode string, phone string) string
- func AutoDelAreaCode(areaCode string, phone string) string
- func BitAutoString(size int64) string
- func FileName(filename string) string
- func IsPhone(s string) bool
- func NumberToChineseCapital(number int64) string
- func PhoneKeepNumbersOnly(phone string) string
- func RemoveAreaCode(countryCode string, phone string) string
- type Countries
- type ListParams
- type Resp
- type RespData
Constants ¶
View Source
const ( ContentTypeDownload = `application/force-download` //文件下载 ContentTypeDefault = `text/plain; charset=UTF-8` //文本 ContentTypeJSON = `application/json; charset=UTF-8` //json ContentTypeHTML = `text/html; charset=UTF-8` //HTML ContentTypeXJS = `application/x-javascript;charset=UTF-8` //JavaScript ContentTypeJS = `text/javascript; charset=utf-8` //JavaScript ContentTypeCSS = `text/css; charset=utf-8` //CSS ContentTypeImageJPEG = `image/jpeg` //jpeg图片 ContentTypeImageJPG = `image/jpeg` //jpg图片 ContentTypeImagePNG = `image/png` //png图片 ContentTypeImageWEBP = `image/webp` //webp图片 ContentTypeImageGIF = `image/gif` //gif图片 ContentTypeImageICON = `image/x-icon` //icon图标 ContentTypeImageOctetStream = `application/octet-stream` //八位字节流 )
Variables ¶
This section is empty.
Functions ¶
func AddAreaCode ¶ added in v0.0.46
AddAreaCode 给号码添加上+号和区号 如果记录中不存在该国家或地区代码,则不做任何修改。
func AutoAddAreaCode ¶ added in v0.0.40
AutoAddAreaCode 自动增加区号 如果返回空字符串,则表示不是合格的手机号
func AutoDelAreaCode ¶ added in v0.0.40
AutoDelAreaCode 自动移除区号
func BitAutoString ¶ added in v0.0.24
BitAutoString 将字节自动输出成合适的单位内容。
func NumberToChineseCapital ¶ added in v0.0.24
NumberToChineseCapital 数字转成中文大写数字
func PhoneKeepNumbersOnly ¶ added in v0.0.10
PhoneKeepNumbersOnly 只保留下数字
func RemoveAreaCode ¶ added in v0.0.46
RemoveAreaCode 根据国家或地区代码,移除号码前面的+号、区号、前缀0 如果记录中不存在该国家或地区代码,则不做任何修改。
Types ¶
type Countries ¶ added in v0.0.10
type Countries struct { Code string `json:"code"` //国家或地区代码,大写 AreaCode string `json:"area_code"` //区号 Name string `json:"name"` //名称 }
func GetAllCountriesInfo ¶ added in v0.0.46
func GetAllCountriesInfo() []Countries
GetAllCountriesInfo 获取全部国家或地区信息
func GetCountryInfo ¶ added in v0.0.10
GetCountryInfo 获取指定国家或地区的区号及名称-根据国家或地区代码
type ListParams ¶ added in v0.0.23
Click to show internal directories.
Click to hide internal directories.