refactor: 删除 cli_contract 文件,合并到 console.go 文件
This commit is contained in:
parent
663d103dc9
commit
03b0c508d8
@ -1,25 +0,0 @@
|
||||
//
|
||||
// cli_contact.go
|
||||
// Copyright (C) 2022 tiglog <me@tiglog.com>
|
||||
//
|
||||
// Distributed under terms of the MIT license.
|
||||
//
|
||||
|
||||
package console
|
||||
|
||||
type ICommand interface {
|
||||
Init(args []string)
|
||||
GetName() string
|
||||
GetDesc() string
|
||||
GetAction() ActionHandler
|
||||
GetHelp() string
|
||||
}
|
||||
|
||||
type IConsole interface {
|
||||
GetCmds() map[string]ICommand
|
||||
GetName() string
|
||||
GetDesc() string
|
||||
GetVersion() string
|
||||
GetExtraAbout() ActionHandler
|
||||
}
|
||||
type ActionHandler func() error
|
@ -94,3 +94,20 @@ func (s *sApp) Run(args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
type ICommand interface {
|
||||
Init(args []string)
|
||||
GetName() string
|
||||
GetDesc() string
|
||||
GetAction() ActionHandler
|
||||
GetHelp() string
|
||||
}
|
||||
|
||||
type IConsole interface {
|
||||
GetCmds() map[string]ICommand
|
||||
GetName() string
|
||||
GetDesc() string
|
||||
GetVersion() string
|
||||
GetExtraAbout() ActionHandler
|
||||
}
|
||||
type ActionHandler func() error
|
||||
|
Loading…
Reference in New Issue
Block a user