gf: github.com/gogf/gf/g/encoding/gurl Index | Files

package gurl

import "github.com/gogf/gf/g/encoding/gurl"

Package gurl provides useful API for URL handling.

Index

Package Files

url.go

func BuildQuery Uses

func BuildQuery(queryData url.Values) string

Generate URL-encoded query string. See http://php.net/manual/en/function.http-build-query.php.

func Decode Uses

func Decode(str string) (string, error)

url decode string

func Encode Uses

func Encode(str string) string

url encode string, is + not %20

func ParseURL Uses

func ParseURL(str string, component int) (map[string]string, error)

Parse a URL and return its components. -1: all; 1: scheme; 2: host; 4: port; 8: user; 16: pass; 32: path; 64: query; 128: fragment. See http://php.net/manual/en/function.parse-url.php.

func RawDecode Uses

func RawDecode(str string) (string, error)

Decode URL-encoded strings. See http://php.net/manual/en/function.rawurldecode.php.

func RawEncode Uses

func RawEncode(str string) string

URL-encode according to RFC 3986. See http://php.net/manual/en/function.rawurlencode.php.

Package gurl imports 2 packages (graph) and is imported by 4 packages. Updated 2019-06-20. Refresh now. Tools for package owners.