url

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package url contains url utilities beyond what is available in the net/url package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFloat64

func GetFloat64(values url.Values, name string) (value float64, err error)

GetFloat64 extracts the named float64 out of values.

func GetInt

func GetInt(values url.Values, name string) (value int, err error)

GetInt extracts the named int out of values.

func GetString

func GetString(values url.Values, name string) (value string, err error)

GetString extracts the named string out of values.

func GetStrings

func GetStrings(values url.Values, name string) (value []string, err error)

GetStrings returns the string array associated with the name

Types

type Builder

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

Builder uses a builder pattern to create a URL.

func NewBuilder

func NewBuilder(path string) *Builder

NewBuilder starts a URL builder

func NewBuilderFromUrl added in v0.1.1

func NewBuilderFromUrl(u url2.URL) *Builder

func (*Builder) ClearFragment added in v0.1.1

func (u *Builder) ClearFragment() *Builder

func (*Builder) RemoveValue added in v0.1.1

func (u *Builder) RemoveValue(k string) *Builder

func (*Builder) SetFragment added in v0.1.1

func (u *Builder) SetFragment(f string) *Builder

func (*Builder) SetValue added in v0.1.1

func (u *Builder) SetValue(k string, v interface{}) *Builder

SetValue sets the GET value in the URL

func (*Builder) String

func (u *Builder) String() string

String returns the encoded URL.

Jump to

Keyboard shortcuts

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