Documentation ¶
Index ¶
- func FlagsFromStruct(v interface{}) ([]cli.Flag, error)
- func FlagsToStruct(context *cli.Context, v interface{}) error
- func NewErrFlagTypeCanNotHaveValue(t string) error
- func NewErrInvalid(v interface{}) error
- func NewErrInvalidKind(expected, got reflect.Kind) error
- func NewErrPtrRequired(v interface{}) error
- func NewErrTypeMistmatch(want string, got string) error
- type ErrFlagTypeCanNotHaveValue
- type ErrInvalid
- type ErrInvalidKind
- type ErrPtrRequired
- type ErrTypeMistmatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlagsFromStruct ¶
func FlagsFromStruct(v interface{}) ([]cli.Flag, error)
FlagsFromStruct generates cli.Flag slice for github.com/urfave/cli from the struct fields.
func FlagsToStruct ¶
func FlagsToStruct(context *cli.Context, v interface{}) error
FlagsToStruct folds a flags from context into the struct fields in v.
func NewErrFlagTypeCanNotHaveValue ¶
NewErrFlagTypeCanNotHaveValue creates new ErrFlagTypeCanNotHaveValue.
func NewErrInvalidKind ¶
NewErrInvalidKind creates new ErrInvalidKind.
func NewErrPtrRequired ¶
func NewErrPtrRequired(v interface{}) error
NewErrPtrRequired creates new ErrPtrRequired.
func NewErrTypeMistmatch ¶
NewErrTypeMistmatch creates new ErrTypeMistmatch.
Types ¶
type ErrFlagTypeCanNotHaveValue ¶
type ErrFlagTypeCanNotHaveValue struct {
// contains filtered or unexported fields
}
ErrFlagTypeCanNotHaveValue is an error indicating that flag type with specified name takes no value.
func (*ErrFlagTypeCanNotHaveValue) Error ¶
func (e *ErrFlagTypeCanNotHaveValue) Error() string
type ErrInvalid ¶
type ErrInvalid struct {
// contains filtered or unexported fields
}
ErrInvalid is an error indicating that invalid values was passed.
func (*ErrInvalid) Error ¶
func (e *ErrInvalid) Error() string
type ErrInvalidKind ¶
type ErrInvalidKind struct {
// contains filtered or unexported fields
}
ErrInvalidKind is an error indicating that reflect.Kind of value is not expected in the context it was used.
func (*ErrInvalidKind) Error ¶
func (e *ErrInvalidKind) Error() string
type ErrPtrRequired ¶
type ErrPtrRequired struct {
// contains filtered or unexported fields
}
ErrPtrRequired is an error indicating that a pointer entity required.
func (*ErrPtrRequired) Error ¶
func (e *ErrPtrRequired) Error() string
type ErrTypeMistmatch ¶
type ErrTypeMistmatch struct {
// contains filtered or unexported fields
}
ErrTypeMistmatch is an error indicating that a wanted type is not equal to actual.
func (*ErrTypeMistmatch) Error ¶
func (e *ErrTypeMistmatch) Error() string