golib/console/cli_base.go

29 lines
426 B
Go
Raw Normal View History

2023-06-15 21:22:51 +08:00
//
// cli_base.go
// Copyright (C) 2022 tiglog <me@tiglog.com>
//
// Distributed under terms of the MIT license.
//
package console
import "flag"
type BaseCmd struct {
Name string
Desc string
FlagSet *flag.FlagSet
Action ActionHandler
}
func (c *BaseCmd) GetName() string {
return c.Name
}
func (c *BaseCmd) GetDesc() string {
return c.Desc
}
func (c *BaseCmd) GetAction() ActionHandler {
return c.Action
}