Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigByDir ¶
func LoadConfigs ¶
func LoadConfigs(configs []ConfigWithFormat, configPtr interface{}) error
func LoadSingleConfig ¶
func LoadSingleConfig(c ConfigWithFormat, configPtr interface{}) error
func NewFileScanner ¶
func NewFileScanner() *scanner
Types ¶
type ConfigFormat ¶
type ConfigFormat string
const ( YamlFormat ConfigFormat = "yaml" TomlFormat ConfigFormat = "toml" JsonFormat ConfigFormat = "json" )
func GuessFormat ¶
func GuessFormat(fpath string) ConfigFormat
type ConfigWithFormat ¶
type ConfigWithFormat struct { Config string `json:"config"` Format ConfigFormat `json:"format"` // contains filtered or unexported fields }
func (*ConfigWithFormat) CheckSum ¶
func (cwf *ConfigWithFormat) CheckSum() string
func (*ConfigWithFormat) SetCheckSum ¶
func (cwf *ConfigWithFormat) SetCheckSum(checkSum string)
Click to show internal directories.
Click to hide internal directories.