Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EnvConfigDir configuration path EnvConfigDir = "CS_CI_EX_GO_CONFIG_DIR" // ConfigName configuration file name ConfigName = "cs_config.json" // app name AppName = "DipperinCIEx" )
View Source
const (
HistoryLimit = 1000
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Console ¶
type Console struct { Prompt *prompt.Prompt History *ConsoleHistory // contains filtered or unexported fields }
func NewConsole ¶
func NewConsole(executor prompt.Executor, completer prompt.Completer) *Console
NewConsole return *Console , completer Completer
func (*Console) WrapExecutor ¶
func (c *Console) WrapExecutor(executor prompt.Executor) prompt.Executor
Wrap the executor function for add the input to history
type ConsoleHistory ¶
type ConsoleHistory struct {
// contains filtered or unexported fields
}
func NewConsoleHistory ¶
func NewConsoleHistory(filePath string) (ch *ConsoleHistory, err error)
NewLineHistory setting history
func (*ConsoleHistory) AddHistoryItem ¶
func (ch *ConsoleHistory) AddHistoryItem(s string)
func (*ConsoleHistory) ClearHistory ¶
func (ch *ConsoleHistory) ClearHistory() (err error)
func (*ConsoleHistory) DoWriteHistory ¶
func (ch *ConsoleHistory) DoWriteHistory() (err error)
DoWriteHistory execute write history file
func (*ConsoleHistory) ReadHistory ¶
func (ch *ConsoleHistory) ReadHistory() (err error)
ReadHistory reading from history file
Click to show internal directories.
Click to hide internal directories.