urlz

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package urlz provides various utilities for working URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeValues

func EncodeValues(m map[string]string) string

EncodeValues is a shorthand for building an encoded query string.

func GetValueDef

func GetValueDef(v url.Values, key, def string) string

GetValueDef tries to get a key from url.Values, returns def if not found.

func MustEdit

func MustEdit(rawURL string, f func(*url.URL)) string

MustEdit parses the given URL, calls f to allow mutations, and then converts the URL back to string.

func MustParse

func MustParse(rawURL string) *url.URL

MustParse is like url.Parse but panics on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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