urlx

package
v3.22.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package urlx contains URL extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveReference

func ResolveReference(baseURL, path, rawQuery string) (string, error)

ResolveReference constructs a new URL consisting of the given base URL with the path appended to the given path and the optional query.

For example, given:

URL := "https://api.ooni.io/api/v1"
path := "/measurement_meta"
rawQuery := "full=true"

This function will return:

result := "https://api.ooni.io/api/v1/measurement_meta?full=true"

This function fails when we cannot parse URL as a *net.URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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