Documentation
¶
Index ¶
- Variables
- type Command
- type Handler
- func (h *Handler) Find(cmds []Command, args ...string) (int, error)
- func (h *Handler) FindAndUnmarshal(cmds []Command, args ...string) (Command, error)
- func (h *Handler) FindCmd(cmds []Command, args ...string) (Command, error)
- func (h *Handler) ParameterUsage(cmd Command) (string, error)
- func (h *Handler) Unmarshal(cmd Command, args ...string) error
- func (h *Handler) Usage(cmd Command, cmdName string, prefix string) (string, error)
- type Info
- type Names
- type RunFunc
- type Runnable
- type UnknownCommandError
- type UnmarshalInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCommandNotSet = errors.New("command not set")
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶ added in v0.11.0
type Handler struct {
Unmarshaler *xstrings.Unmarshaler
FieldNameBeginsLowerCase bool
FieldNameFold bool
FieldTagKey string
}
func (*Handler) FindAndUnmarshal ¶ added in v0.11.0
func (*Handler) ParameterUsage ¶ added in v0.11.0
type Runnable ¶
func NewRunnable ¶
func NewRunnable(unmarshalInterface UnmarshalInterface, f RunFunc) Runnable
type UnknownCommandError ¶
type UnknownCommandError struct {
// contains filtered or unexported fields
}
func (*UnknownCommandError) Error ¶
func (e *UnknownCommandError) Error() string
func (*UnknownCommandError) Name ¶
func (e *UnknownCommandError) Name() string
func (*UnknownCommandError) Unwrap ¶
func (e *UnknownCommandError) Unwrap() error
type UnmarshalInterface ¶
type UnmarshalInterface interface{}
Click to show internal directories.
Click to hide internal directories.