Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arg ¶
type Arg interface { // GetValue 参数值 GetValue() interface{} // GetDefaultText 默认值 GetDefaultText() string // contains filtered or unexported methods }
type Command ¶
type Command interface { // Run 命令实际执行 Run(ctx *Context) error // SubCommands 子命令 SubCommands() []Command // contains filtered or unexported methods }
Command 描述一个可以被执行的命令
type Service ¶ added in v1.0.1
type Service interface { // NextId 生成下一个编号 NextId() int64 // Debug 记录调试日志 Debug(msg string, fields ...gox.Field) // Info 记录普通信息日志 Info(msg string, fields ...gox.Field) // Warn 记录警告日志 Warn(msg string, fields ...gox.Field) // Error 记录错误日志 Error(msg string, fields ...gox.Field) // Panic 记录异常日志,程序会退出,可以使用recover机制来阻止程序退出 Panic(msg string, fields ...gox.Field) // Fatal 记录致命错误日志,程序会退出 Fatal(msg string, fields ...gox.Field) }
Service 应用服务,用来组装常用行为
Click to show internal directories.
Click to hide internal directories.