urlbuilder

package
v0.0.0-...-a31c35c Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

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 is a builder for constructing URLs

func New

func New(scheme string, host string) *URLBuilder

New creates a new URLBuilder with the given scheme and host

func (*URLBuilder) Build

func (ub *URLBuilder) Build() templ.SafeURL

Build constructs the final URL as a SafeURL

func (*URLBuilder) Fragment

func (ub *URLBuilder) Fragment(fragment string) *URLBuilder

Fragment sets the fragment (hash) part of the URL

func (*URLBuilder) Path

func (ub *URLBuilder) Path(segment string) *URLBuilder

Path adds a path segment to the URL

func (*URLBuilder) Query

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

Query adds a query parameter to the URL

Jump to

Keyboard shortcuts

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