Documentation ¶
Index ¶
- type DefaultUI
- func (ui *DefaultUI) ErrorAPI(err error)
- func (ui *DefaultUI) ErrorInvalidAppPath(arg string) int
- func (ui *DefaultUI) ErrorNoFlagAfterArg(s []string) int
- func (ui *DefaultUI) ErrorNotEnoughArgs(command, help string, n int) int
- func (ui *DefaultUI) Raw(v interface{}) int
- func (ui *DefaultUI) Table(kind string, v interface{})
- type MockUI
- func (ui *MockUI) ErrorAPI(err error)
- func (ui *MockUI) ErrorInvalidAppPath(arg string) int
- func (ui *MockUI) ErrorNoFlagAfterArg(s []string) int
- func (ui *MockUI) ErrorNotEnoughArgs(command, help string, n int) int
- func (ui *MockUI) Raw(v interface{}) int
- func (ui *MockUI) Table(kind string, v interface{})
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultUI ¶
DefaultUI is an implementation of UI.
func (*DefaultUI) ErrorAPI ¶
ErrorAPI is used for api related error messages that might appear on stderr.
func (*DefaultUI) ErrorInvalidAppPath ¶
ErrorInvalidAppPath is used for cli error related to an invalid app path
func (*DefaultUI) ErrorNoFlagAfterArg ¶
ErrorNoFlagAfterArg is used for cli error related to wrong argument order
func (*DefaultUI) ErrorNotEnoughArgs ¶
ErrorNotEnoughArgs is used for cli error related to a minimum of argument.
type MockUI ¶
MockUI is a mock UI that is used for tests and is exported publicly for use in external tests if needed as well.
func (*MockUI) ErrorAPI ¶
ErrorAPI is used for api related error messages that might appear on stderr.
func (*MockUI) ErrorInvalidAppPath ¶
ErrorInvalidAppPath used for print error
func (*MockUI) ErrorNoFlagAfterArg ¶
ErrorNoFlagAfterArg used for print error
func (*MockUI) ErrorNotEnoughArgs ¶
ErrorNotEnoughArgs is used for cli error related to a minimum of argument.
type UI ¶
type UI interface { cli.Ui // ErrorAPI is used for api related error messages that might appear on // stderr. ErrorAPI(error) ErrorNotEnoughArgs(string, string, int) int ErrorInvalidAppPath(string) int ErrorNoFlagAfterArg([]string) int Table(string, interface{}) Raw(interface{}) int }
UI is an interface for interacting with the terminal, or "interface" of a CLI. Based on cli.Ui