Documentation ¶
Overview ¶
Package rootcmd provide common functions to hollow binaries and cli set up
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { App string ConfigFile string Debug bool PrettyPrint bool // contains filtered or unexported fields }
Options are the basic setting rootcmd needs or sets
func (*Options) GetConfigFile ¶
GetConfigFile returns the path to the config file
func (*Options) GetLogger ¶
func (o *Options) GetLogger() *zap.SugaredLogger
GetLogger returns the zap.SugarLogger
func (*Options) InitConfig ¶
func (o *Options) InitConfig()
InitConfig reads in config file and ENV variables if set.
func (*Options) SetupLogging ¶
func (o *Options) SetupLogging(logger *zap.SugaredLogger)
SetupLogging is a common configuraion of a zap.SugaredLogger, set to the logger passed
Click to show internal directories.
Click to hide internal directories.