Documentation ¶
Index ¶
- Constants
- 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 PhoneAddAreaCode(phone string, countryCode string) string
- func PhoneKeepNumbersOnly(phone string) string
- func PhoneRemoveAreaCode(phone string, countryCode 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 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 PhoneAddAreaCode ¶ added in v0.0.10
PhoneAddAreaCode 给号码添加上+号和区号
func PhoneKeepNumbersOnly ¶ added in v0.0.10
PhoneKeepNumbersOnly 只保留下数字
func PhoneRemoveAreaCode ¶ added in v0.0.10
PhoneRemoveAreaCode 移除号码前面的+号和区号
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 GetCountryInfo ¶ added in v0.0.10
GetCountryInfo 获取指定国家或地区的区号及名称-根据国家或地区代码
type ListParams ¶ added in v0.0.23
Click to show internal directories.
Click to hide internal directories.