clihelpers

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlagsFromStruct

func GetFlagsFromStruct(data interface{}, ns ...string) []cli.Flag

Types

type Marshaler

type Marshaler interface {
	// MarshalFlag marshals a flag value to its string representation.
	MarshalFlag() (string, error)
}

Marshaler is the interface implemented by types that can marshal themselves to a string representation of the flag.

type StructFieldFlag

type StructFieldFlag struct {
	cli.GenericFlag
}

func (StructFieldFlag) String

func (f StructFieldFlag) String() string

type StructFieldValue

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

func (StructFieldValue) IsBoolFlag

func (f StructFieldValue) IsBoolFlag() bool

func (StructFieldValue) Set

func (s StructFieldValue) Set(val string) error

func (StructFieldValue) String

func (s StructFieldValue) String() string

type Unmarshaler

type Unmarshaler interface {
	// UnmarshalFlag unmarshals a string value representation to the flag
	// value (which therefore needs to be a pointer receiver).
	UnmarshalFlag(value string) error
}

Unmarshaler is the interface implemented by types that can unmarshal a flag argument to themselves. The provided value is directly passed from the command line.

Jump to

Keyboard shortcuts

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