cli

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: GPL-3.0, GPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGroup

func NewGroup(args *groupCommand) *group

NewGroup create an object related to group command

func NewTokenize

func NewTokenize(args *tokenizeCommand) *tokenize

NewTokenize create an object related to tokenize command

func Run

func Run(version string)

Run commmand line arguments parsing

Types

type Parser

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

Parser represent a parser statement

func ParserWrapper

func ParserWrapper(s *kingpin.ArgClause) (target *Parser)

ParserWrapper is used to transform argument from command line

func (*Parser) Get

func (p *Parser) Get() *parser.Parser

Get parser

func (*Parser) Set

func (p *Parser) Set(value string) error

Set is used to populate statement from string

func (*Parser) String

func (p *Parser) String() string

String

type Positions

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

Positions is an array of position

func PositionsWrapper

func PositionsWrapper(s kingpin.Settings) (target *Positions)

PositionsWrapper is used to transform argument from command line

func (*Positions) Get

func (p *Positions) Get() *[]int

Get positions

func (*Positions) Set

func (p *Positions) Set(value string) error

Set is used to populate statement from string

func (*Positions) String

func (p *Positions) String() string

String

type Sorters

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

Sorters is a map of statement sort by position

func SortersWrapper

func SortersWrapper(s kingpin.Settings) (target *Sorters)

SortersWrapper is used to transform argument from command line

func (*Sorters) Get

func (s *Sorters) Get() *sorter.Sorters

Get sorters

func (*Sorters) Init

func (s *Sorters) Init()

Init all starting states

func (*Sorters) Set

func (s *Sorters) Set(value string) error

Set is used to populate statement from string

func (*Sorters) String

func (s *Sorters) String() string

String

func (*Sorters) ValidatePositions

func (s *Sorters) ValidatePositions(positions *[]int) error

ValidatePositions against defined sorters

type Transformers

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

Transformers is a map of statement sort by position

func TransformersWrapper

func TransformersWrapper(s kingpin.Settings) (target *Transformers)

TransformersWrapper is used to transform argument from command line

func (*Transformers) Get

Get transformers

func (*Transformers) Init

func (t *Transformers) Init()

Init all starting states

func (*Transformers) IsCumulative

func (t *Transformers) IsCumulative() bool

IsCumulative is used for repeated flags on cli

func (*Transformers) Set

func (t *Transformers) Set(value string) error

Set is used to populate statement from string

func (*Transformers) String

func (t *Transformers) String() string

String

func (*Transformers) ValidatePositions

func (t *Transformers) ValidatePositions(positions *[]int) error

ValidatePositions against extracted transformers

Jump to

Keyboard shortcuts

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