gurl

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package gurl provides useful API for URL handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildQuery

func BuildQuery(queryData url.Values) string

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

func Decode

func Decode(str string) (string, error)

url decode string

func Encode

func Encode(str string) string

url encode string, is + not %20

func ParseURL

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

func RawDecode(str string) (string, error)

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

func RawEncode

func RawEncode(str string) string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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