command

package
v0.0.0-...-af4dc90 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFlags

func AllFlags(cfg *config.Config) []cli.Flag

AllFlags defines flags for all subcommand.

func Fragment

func Fragment(cfg *config.Config) cli.ActionFunc

Fragment prints out the fragment part from the url.

func Host

func Host(cfg *config.Config) cli.ActionFunc

Host prints out the host part from the url.

func Password

func Password(cfg *config.Config) cli.ActionFunc

Password prints out the password part from url.

func Path

func Path(cfg *config.Config) cli.ActionFunc

Path prints out the path part from url.

func PathFlags

func PathFlags(cfg *config.Config) []cli.Flag

PathFlags defines flags for path subcommand.

func Port

func Port(cfg *config.Config) cli.ActionFunc

Port prints out the port from the url.

func Query

func Query(cfg *config.Config) cli.ActionFunc

Query prints out the query part from url.

func QueryFlags

func QueryFlags(cfg *config.Config) []cli.Flag

QueryFlags defines flags for query subcommand.

func Run

func Run(cfg *config.Config) cli.ActionFunc

Run default command and print out full url.

func Scheme

func Scheme(cfg *config.Config) cli.ActionFunc

Scheme prints out the scheme part from the url.

func User

func User(cfg *config.Config) cli.ActionFunc

User prints out the user part from url.

Types

type Parser

type Parser struct {
	URL        string
	QueryField string
	QuerySplit bool
}

func NewURLParser

func NewURLParser(url, queryField string, querySplit bool) *Parser

type QueryParam

type QueryParam struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type URL

type URL struct {
	Scheme      string       `json:"scheme"`
	Hostname    string       `json:"hostname"`
	Port        string       `json:"port"`
	Path        string       `json:"path"`
	Fragment    string       `json:"fragment"`
	RawQuery    string       `json:"rawQuery"`
	Query       string       `json:"-"`
	QueryParams []QueryParam `json:"queryParams"`
	Username    string       `json:"username"`
	Password    string       `json:"password"`
	// contains filtered or unexported fields
}

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