urlbuilder

package
v0.0.0-...-8d55aa0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: EUPL-1.2 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URLBuilder

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

URLBuilder helps to build (absolute) URLs.

func (*URLBuilder) AddPath

func (ub *URLBuilder) AddPath(p string) *URLBuilder

AddPath adds a new path element.

func (*URLBuilder) AddQuery

func (ub *URLBuilder) AddQuery(key, value string) *URLBuilder

AddQuery adds a new key/value query parameter

func (*URLBuilder) Copy

func (ub *URLBuilder) Copy(dest *URLBuilder)

Copy an URLBuilder.

func (*URLBuilder) RemoveQueries

func (ub *URLBuilder) RemoveQueries() *URLBuilder

RemoveQueries removes all previously added key/value query parameter. This allows to recycle an URLBuilder, to be used for various query parameter values, where the path (and the fragment) stays constant.

func (*URLBuilder) SetFragment

func (ub *URLBuilder) SetFragment(frag string) *URLBuilder

SetFragment stores the fragment

func (*URLBuilder) String

func (ub *URLBuilder) String() string

String constructs a string representation of the URL.

Jump to

Keyboard shortcuts

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