README ¶ domainutil go get github.com/lixiangzhong/domainutil host,sld,tld,err := doaminutil.Split("www.abc.com") //host: www //sld: abc //tld: com Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Punycode(s string) (string, error) func Split(s string) (host, sld, tld string, err error) func Unicode(s string) (string, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Punycode ¶ func Punycode(s string) (string, error) Punycode 中文域名转成ascii func Split ¶ func Split(s string) (host, sld, tld string, err error) Split split www.abc.com => host:www sld:abc tld:com err:nil func Unicode ¶ func Unicode(s string) (string, error) Unicode 将s转成中文域名 Types ¶ This section is empty. Source Files ¶ View all Source files domain.go punycode.go Click to show internal directories. Click to hide internal directories.