url

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package url replaces the standard net/url package for basic url operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	// Scheme is the type of request.
	Scheme string
	// Authority is the host and port of the url without a leading //.
	Authority string
	// Path is the location on the host.
	Path string
	// RawQuery contains additional options
	RawQuery string
}

URL is the address of the form

func Parse

func Parse(text string) (*URL, error)

Parse creates a URL out of the text.

func (URL) String

func (u URL) String() string

String concatenates the scheme, authority, path, and raw query of the url

type Values

type Values map[string]string

Values is the query params contain options for the url.

func (Values) Add

func (v Values) Add(key, value string)

Add stores the value for the key.

func (Values) Encode

func (v Values) Encode() string

Encode concatenates the values together

func (Values) Get

func (v Values) Get(key string) string

Get gets the value associated with the key, or an empty string if the value is not present.

Jump to

Keyboard shortcuts

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