Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶ added in v0.3.0
Marshal converts the passed object into byte data, based on the specified file format
func MergePluginCfg ¶
func MergePluginCfg(pluginName string, h *CfgHandler, pluginCfg interface{}) error
MergePluginCfg adds config of specified plugin into the host CLI config struct.
Types ¶
type CfgHandler ¶
type CfgHandler struct {
// contains filtered or unexported fields
}
CfgHandler defines the fields required to manage config.
func NewHandler ¶
func NewHandler(path string, cfg interface{}) *CfgHandler
NewHandler links the specified arguments to a new instance of config handler and returns a pointer to it.
func (*CfgHandler) Load ¶
func (h *CfgHandler) Load() error
Load reads config values from the local config file (using the file path linked to the handler) and stores them into the linked instance of host CLI config struct.
func (*CfgHandler) Save ¶
func (h *CfgHandler) Save() error
Save writes config values from the linked instance of host CLI config struct to the local config file (using the file path linked to the handler).
Click to show internal directories.
Click to hide internal directories.