cmdline

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TOKEN_INVALID = iota
	TOKEN_BAREARG
	TOKEN_SWITCH
	TOKEN_SWITCH_PAGER
	TOKEN_SWITCH_CRAWLER
	TOKEN_URL
	TOKEN_ARG
	TOKEN_EOS
)
View Source
const (
	LIT_MINUS = "-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs map[string][]string

func (Attrs) Set

func (v Attrs) Set(s string) error

func (Attrs) String

func (v Attrs) String() string

type Boolean

type Boolean bool

func (*Boolean) Set

func (b *Boolean) Set(s string) error

func (*Boolean) String

func (b *Boolean) String() string

type EndPage

type EndPage struct {
	End int
	// contains filtered or unexported fields
}

func NewEndPage

func NewEndPage(start *StartPage) *EndPage

func (*EndPage) Set

func (p *EndPage) Set(s string) error

func (*EndPage) String

func (p *EndPage) String() string

type FSDirectory

type FSDirectory struct {
	Path string
}

func (*FSDirectory) Set

func (v *FSDirectory) Set(s string) error

func (*FSDirectory) String

func (v *FSDirectory) String() string

type IntRange

type IntRange struct {
	Range [2]int
}

func (*IntRange) Set

func (v *IntRange) Set(s string) error

func (*IntRange) String

func (v *IntRange) String() string

type Lexer

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

func (*Lexer) Analyze

func (l *Lexer) Analyze(args []string) error

type Parser

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

func NewParser

func NewParser(l *Lexer) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (*Product, error)

type Product

type Product struct {
	GlobalFlags  []string
	Crawler      string
	CrawlerFlags []string
	Pager        string
	PagerFlags   []string
	Url          string
}

type SingleURL

type SingleURL struct {
	URL *url.URL
}

func (*SingleURL) Set

func (v *SingleURL) Set(s string) error

func (*SingleURL) String

func (v *SingleURL) String() string

type StartPage

type StartPage int

func (*StartPage) Set

func (i *StartPage) Set(s string) error

func (*StartPage) String

func (i *StartPage) String() string

type URLCollection

type URLCollection struct {
	URLs []*url.URL
}

URLCollection is used to convert a comma seperated string of raw urls into a slice of pointers to URL types.

func (*URLCollection) Set

func (v *URLCollection) Set(s string) error

func (*URLCollection) String

func (v *URLCollection) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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