cli

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultUnmarshalProps

func DefaultUnmarshalProps() argo.UnmarshalProps

DefaultUnmarshalProps returns a defaulted unmarshaling configuration.

func LFlag added in v0.1.5

func LFlag(long, desc string) argo.FlagBuilder

LFlag is a shorthand for creating a new FlagBuilder then setting the long flag and description.

Same as calling `NewFlag().Long(long).Description(desc)`

func NewArg

func NewArg() argo.ArgumentBuilder

NewArg returns a new instance of an ArgumentBuilder from the current provider.

Same as calling `Provider().NewArg()`

func NewCommand

func NewCommand() argo.CommandBuilder

NewCommand returns a new instance of a CommandBuilder from the current provider.

Same as calling `Provider().NewCommand()`

func NewFlag

func NewFlag() argo.FlagBuilder

NewFlag returns a new instance of a FlagBuilder from the current provider.

Same as calling `Provider().NewFlag()`

func NewFlagGroup

func NewFlagGroup() argo.FlagGroupBuilder

NewFlagGroup returns a new instance of a FlagGroupBuilder from the current provider

Same as calling `Provider().NewFlagGroup()`

func Provider

func Provider() argo.Provider

Provider returns an instance of the default Provider implementation.

This method is provided to allow the use of custom CLI element implementations.

func SFlag added in v0.1.5

func SFlag(short byte, desc string) argo.FlagBuilder

SFlag is a shorthand for creating a new FlagBuilder then setting the short flag and description.

Same as calling `NewFlag().Short(short).Description(desc)`

func SetProvider

func SetProvider(pro argo.Provider)

SetProvider allows the override of the provider type.

Intended to allow completely changing the behavior of of the way CLI elements are constructed.

func SlFlag added in v0.1.5

func SlFlag(short byte, long, desc string) argo.FlagBuilder

SlFlag is a shorthand for creating a new FlagBuilder then setting the short flag, long flag, and description.

Same as calling `NewFlag().Short(short).Long(long).Description(desc)`

func Unmarshal

func Unmarshal(raw string, ptr interface{}, props argo.UnmarshalProps) (err error)

Unmarshal attempts to unmarshal the given string into the given pointer using the provided unmarshaling configuration.

func UnmarshalDefault

func UnmarshalDefault(raw string, ptr interface{}) (err error)

UnmarshalDefault attempts to unmarshal the given string into the given pointer using the default unmarshaling configuration.

Types

This section is empty.

Directories

Path Synopsis
internal
log
pkg

Jump to

Keyboard shortcuts

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