urls

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(p string) string

Return a file URL for the provided path

func Join

func Join(b string, c ...interface{}) string

Join a base URL together with path components, similar to the functionality of path.Join.

func MergeQuery

func MergeQuery(s string, p ...url.Values) (string, error)

Merge the specified qweury parameters into the provided URL. Parameters with existing keys are added, not replaced.

func ParseValueList

func ParseValueList(v url.Values, k, d string) []string

Parse parameters from the provided Values and produce a list of results for the specified key. Both values defined by repeatedly providing a key and those provided in a delimited list for a single key are returned.

For example, using the delimiter ',':

a=one&a=two        -> [one, two]
a=one,two          -> [one, two]
a=one,two&a=three  -> [one, two, three]

Types

This section is empty.

Jump to

Keyboard shortcuts

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