command

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AA

type AA = A.Argument

type AAB

type AAB = A.ArgumentBuilder

type AC

type AC = A.Command

type ACB

type ACB = A.CommandBuilder

func NewBuilder

func NewBuilder(provider AP) ACB

type AF

type AF = A.Flag

type AFG

type AFG = A.FlagGroup

type AFGB

type AFGB = A.FlagGroupBuilder

type AP

type AP = A.Provider

type AVU

type AVU = A.ValueUnmarshaler

type Builder

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

func (*Builder) Arg

func (c *Builder) Arg(arg AAB) ACB

func (*Builder) Build

func (c *Builder) Build() (AC, error)

func (*Builder) Description

func (c *Builder) Description(desc string) ACB

func (*Builder) DisableHelp

func (c *Builder) DisableHelp() ACB

func (*Builder) Examples

func (c *Builder) Examples(examples ...string) ACB

func (*Builder) Flag

func (c *Builder) Flag(flag A.FlagBuilder) ACB

func (*Builder) FlagGroup

func (c *Builder) FlagGroup(builder AFGB) (this ACB)

func (*Builder) GetArgs

func (c *Builder) GetArgs() []AAB

func (*Builder) GetDescription

func (c *Builder) GetDescription() string

func (*Builder) GetFlagGroups

func (c *Builder) GetFlagGroups() []AFGB

func (*Builder) HasDescription

func (c *Builder) HasDescription() bool

func (*Builder) MustBuild

func (c *Builder) MustBuild() AC

func (*Builder) MustParse

func (c *Builder) MustParse() A.Command

func (*Builder) Parse

func (c *Builder) Parse() (com A.Command, err error)

func (*Builder) Unmarshaler

func (c *Builder) Unmarshaler(un AVU) ACB

func (*Builder) Warnings

func (c *Builder) Warnings() []string

type Command

type Command struct {
	trait.Described

	ValueUnmarshaler argo.ValueUnmarshaler

	// flag groups
	Groups []argo.FlagGroup

	// positional arguments
	PositionalArgs []argo.Argument

	// unknown inputs
	Unmapped []string

	// passthrough values (values appearing after "--" on the
	// cli)
	Passthrough []string
}

func (*Command) AppendPassthrough

func (c *Command) AppendPassthrough(val string)

See argo.Command#AppendPassthrough()

func (*Command) AppendUnmapped

func (c *Command) AppendUnmapped(val string)

See argo.Command#AppendUnmapped()

func (*Command) Arguments

func (c *Command) Arguments() []AA

See argo.Command#Arguments()

func (*Command) FlagGroups

func (c *Command) FlagGroups() []AFG

See argo.Command#FlagGroups()

func (*Command) Name

func (c *Command) Name() string

See argo.Command#Name()

func (*Command) Passthroughs

func (c *Command) Passthroughs() []string

See argo.Command#Passthroughs()

func (*Command) String

func (c *Command) String() string

func (*Command) UnmappedInput

func (c *Command) UnmappedInput() []string

See argo.Command#UnmappedInput()

func (*Command) Unmarshaler

func (c *Command) Unmarshaler() AVU

See argo.Command#Unmarshaller()

Jump to

Keyboard shortcuts

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