path

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Path

type Path struct {
	// contains filtered or unexported fields
}

Path defines a absolute path for calling requests to the server.

func MakePath

func MakePath(base *url.URL) Path

MakePath creates a URL for queries to a server.

func (Path) Join

func (u Path) Join(names ...string) (Path, error)

Join will sum path names onto a base URL and ensure it constructs a URL that is valid. Example:

func (Path) Query

func (u Path) Query(key string, value string) (Path, error)

Query adds additional query parameters to the Path. Example:

func (Path) String

func (u Path) String() string

String returns a stringified version of the Path. Under the hood this calls the url.URL#String method.

Jump to

Keyboard shortcuts

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