Documentation ¶
Index ¶
- type URLBuilder
- func (ub *URLBuilder) AddPath(p string) *URLBuilder
- func (ub *URLBuilder) AddQuery(key, value string) *URLBuilder
- func (ub *URLBuilder) Copy(dest *URLBuilder)
- func (ub *URLBuilder) RemoveQueries() *URLBuilder
- func (ub *URLBuilder) SetFragment(frag string) *URLBuilder
- func (ub *URLBuilder) String() string
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) 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.
Click to show internal directories.
Click to hide internal directories.