Documentation ¶
Index ¶
- func WriteYamlFile(filename string, v interface{}) error
- type Ctx
- func (c *Ctx) AddCommand(name string, fn func(...string), commands ...func(*cobra.Command))
- func (c *Ctx) Conf(configs ...interface{})
- func (c *Ctx) Context() context.Context
- func (c *Ctx) Execute(fn func(...string), commands ...func(*cobra.Command))
- func (c *Ctx) MarshalDefault() error
- func (c *Ctx) Root() string
- func (c *Ctx) String() string
- type Marshaller
- type OptSetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteYamlFile ¶
Types ¶
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) AddCommand ¶
func (*Ctx) Conf ¶
func (c *Ctx) Conf(configs ...interface{})
Conf init all configs from yml file, and do initialization for each config. config dir include `config.yml.template` `config.yml` and `master.yml` config.yml.template shows config file template and preset config values config.yml contains all user configured values
func (*Ctx) MarshalDefault ¶
type Marshaller ¶
type OptSetter ¶
type OptSetter = func(conf *Ctx)
func WithDeployer ¶
func WithLogger ¶
func WithVersion ¶
Click to show internal directories.
Click to hide internal directories.