urlx

package
v0.0.0-...-02246d9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAbsolute

func IsAbsolute(s string) bool

IsAbsolute 是否为绝对地址

func IsRelative

func IsRelative(url string) bool

IsRelative 是否为相对地址

Types

type URL

type URL struct {
	Path    string   // URL path
	URL     *url.URL // A url.URL represents
	Invalid bool     // Path is a valid url
	// contains filtered or unexported fields
}

func NewURL

func NewURL(path string) *URL

func (URL) AddValue

func (u URL) AddValue(key, value string) URL

func (URL) DelKey

func (u URL) DelKey(key string) URL

func (URL) GetValue

func (u URL) GetValue(key, defaultValue string) string

func (URL) HasKey

func (u URL) HasKey(key string) bool

func (URL) SetValue

func (u URL) SetValue(key, value string) URL

func (URL) String

func (u URL) String() string

Jump to

Keyboard shortcuts

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