Documentation ¶
Overview ¶
* @Author: NyanCatda * @Date: 2022-03-30 19:57:58 * @LastEditTime: 2022-04-04 12:28:51 * @LastEditors: NyanCatda * @Description: 命令处理 * @FilePath: \Momizi\Tools\Terminal\Command\Command.go
* @Author: NyanCatda * @Date: 2022-04-02 22:17:05 * @LastEditTime: 2022-04-02 23:24:13 * @LastEditors: NyanCatda * @Description: 退出命令 * @FilePath: \Momizi\Tools\Terminal\Command\Exit.go
* @Author: NyanCatda * @Date: 2022-04-02 22:18:50 * @LastEditTime: 2022-04-03 13:12:09 * @LastEditors: NyanCatda * @Description: 帮助命令 * @FilePath: \Momizi\Tools\Terminal\Command\Help.go
* @Author: NyanCatda * @Date: 2022-04-04 12:14:09 * @LastEditTime: 2022-04-04 12:42:36 * @LastEditors: NyanCatda * @Description: 插件操作命令 * @FilePath: \Momizi\Tools\Terminal\Command\Plugin.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CommandList []CommandInfo
Functions ¶
func AddCommand ¶
func AddCommand(Command string, Help string, Callback CommandFunc)
*
- @description: 添加命令
- @param {string} Command 命令
- @param {string} Help 帮助信息
- @param {CommandFunc} Callback 回调函数
- @return {*}
func Exit ¶
func Exit(CommandParameters []string)
*
- @description: 退出命令
- @param {[]string} CommandParameters 命令参数
- @return {*}
Types ¶
type CommandFunc ¶
type CommandFunc func([]string)
type CommandInfo ¶
type CommandInfo struct { Command string Help string Callback CommandFunc }