urls

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitHostPort added in v0.8.0

func SplitHostPort(pair string) (string, string, error)

SplitHostPort should be able to accept

ip:port
zk://host1:port1,host2:port2,.../path
zk://username:password@host1:port1,host2:port2,.../path
file:///path/to/file (where file contains one of the above)

Types

type Builder

type Builder url.URL

Builder represents a URL under construction

func (Builder) With

func (b Builder) With(options ...Option) Builder

With configures a net.URL via a Builder wrapper, returns the modified result

type Option

type Option func(*Builder)

Option is a functional type that configures a URL

func Host

func Host(host string) Option

Host returns an Option to configure a Builder.Host

func Path

func Path(path string) Option

Path returns an Option to configure a Builder.Path

func Scheme

func Scheme(scheme string) Option

Scheme returns an Option to configure a Builder.Scheme

Jump to

Keyboard shortcuts

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