cfg

package
v0.0.0-...-5655933 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigByDir

func LoadConfigByDir(configDir string, configPtr interface{}) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL