Documentation ¶
Index ¶
- Variables
- func Abs(baseURL, path string) string
- func EncodeQuery(q map[string]string) string
- func EncodeValues(v url.Values, mode EscapeEncoding) string
- func HostOf(urlStr string, withPort, topLevel bool) string
- func Join(p ...string) string
- func JoinHostAndPort(host string, port int) string
- func QueryEscape(s string, mode EscapeEncoding) string
- func SplitPort(hostAndPort string) (string, int)
- func ToValues(q map[string]string) url.Values
- func TopLevelDomainOfHost(hostAndPort string, withPort bool) string
- type EscapeEncoding
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 来自 http://www.iana.org/domains/root/db TopLevelDomains = []string{}/* 1559 elements not displayed */ TopLevelDomainsSet = stringsx.SetOf(TopLevelDomains...) )
Functions ¶
func EncodeQuery ¶
func EncodeValues ¶
func EncodeValues(v url.Values, mode EscapeEncoding) string
func JoinHostAndPort ¶
func QueryEscape ¶
func QueryEscape(s string, mode EscapeEncoding) string
func TopLevelDomainOfHost ¶
Types ¶
type EscapeEncoding ¶
type EscapeEncoding int
const ( EscapeEncodePath EscapeEncoding = 1 + iota EscapeEncodeHost EscapeEncodeZone EscapeEncodeUserPassword EscapeEncodeQueryComponent EscapeEncodeFragment )
Click to show internal directories.
Click to hide internal directories.