26 lines
447 B
Go
26 lines
447 B
Go
|
//
|
||
|
// 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
|