Documentation
¶
Index ¶
- func CliDefaultClientStart() bool
- func CliDoClient(host string, args []string)
- func CliDoClientOutput(host string, args []string, timeoutMs int) (string, error)
- func GetVarType(e interface{}) string
- func InitCliCmd(cli *CliServer)
- type CliCallback
- type CliServer
- func (me *CliServer) AddCmd(parent *CmdItem, cmdName, cmdComment string, cmdFunc CliCallback, ...) *CmdItem
- func (me *CliServer) Close()
- func (me *CliServer) GetCmdData() interface{}
- func (me *CliServer) Handle() error
- func (me *CliServer) Output(buffer *bytes.Buffer, str string)
- func (me *CliServer) PrintUsage(buffer *bytes.Buffer)
- func (me *CliServer) SetReadTimeout(v int)
- func (me *CliServer) Start()
- type CmdItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CliDefaultClientStart ¶
func CliDefaultClientStart() bool
func CliDoClientOutput ¶
CliDoClientOutput CliDoClientOutput
Types ¶
type CliServer ¶
type CliServer struct {
// contains filtered or unexported fields
}
func CliDefaultServerStart ¶
func (*CliServer) AddCmd ¶
func (me *CliServer) AddCmd(parent *CmdItem, cmdName, cmdComment string, cmdFunc CliCallback, data ...interface{}) *CmdItem
AddCmd 添加命令行
func (*CliServer) GetCmdData ¶
func (me *CliServer) GetCmdData() interface{}
GetCmdData 获取当前执行命令行的用户数据
func (*CliServer) PrintUsage ¶
PrintUsage 打印帮助信息
func (*CliServer) SetReadTimeout ¶
Click to show internal directories.
Click to hide internal directories.