domainutil

package module
v0.0.0-...-399a1f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 6 Imported by: 0

README

domainutil

GoDoc

go get github.com/lixiangzhong/domainutil
host,sld,tld,err := doaminutil.Split("www.abc.com")
//host: www
//sld: abc
//tld: com

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL