url

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanPath

func CleanPath(p string) (string, error)

func EncodeForm

func EncodeForm(values map[string]string) string

func Escape

func Escape(s string) string

func IsSubpath

func IsSubpath(base string, candidate string) bool

func String

func String(b Builder) string

func Unescape

func Unescape(s string) (string, error)

Types

type Builder

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

func New

func New(base string) Builder

func Param

func Param(b Builder, name string, value any) Builder

type Parsed

type Parsed struct {
	Scheme   string
	Host     string
	Path     string
	Fragment string
	Params   map[string]string
	Raw      string
}

func MustParse added in v0.53.0

func MustParse(s string) Parsed

func Parse

func Parse(s string) (Parsed, error)

type ParsedMulti

type ParsedMulti struct {
	Scheme   string
	Host     string
	Path     string
	Fragment string
	Params   map[string][]string
	Raw      string
}

func MustParseMulti added in v0.53.0

func MustParseMulti(s string) ParsedMulti

func ParseMulti

func ParseMulti(s string) (ParsedMulti, error)

Jump to

Keyboard shortcuts

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