urlquery

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBool

func DecodeBool(u url.URL, name string) (bool, error)

Decodes a boolean value from the url's query params. Will return an error if the value is not set

func DecodeBoolDefault

func DecodeBoolDefault(u url.URL, name string, defaultVal bool) bool

Decodes a boolean value from the url's query params. Will return the default value if the value is not set

func DecodeInt

func DecodeInt(u url.URL, name string) (int, error)

Decodes an integer value from the url's query params. Will return an error if the value is not set

func DecodeIntDefault

func DecodeIntDefault(u url.URL, name string, defaultVal int) int

Decodes an integer value from the url's query params. Will return the default value if the value is not set

func DecodeStringDefault

func DecodeStringDefault(u url.URL, name string, defaultVal string) string

Gets a string value from the url's query params. Will return the default value if the value is not set

func EncodeBool

func EncodeBool(q *url.Values, name string, value bool)

Adds a boolean value to the give url values

func EncodeInt

func EncodeInt(q *url.Values, name string, value int)

Adds an integer value to the give url values

Types

This section is empty.

Jump to

Keyboard shortcuts

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