Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ENV = os.Getenv("ENV")
Functions ¶
func LoadConfig ¶
func LoadConfig[Cfg any](files ...ConfigFile) *Cfg
LoadConfig loads the configuration object from the provided files, in order. Files are automatically filtered using their environment property, and the current ENV value.
Types ¶
type ConfigFile ¶
type ConfigFile struct {
// contains filtered or unexported fields
}
ConfigFile represents an embedded .yaml file, that holds the configuration object.
func NewConfig ¶ added in v1.0.0
func NewConfig(env string, file []byte) ConfigFile
NewConfig creates a new ConfigFile object, targeted to a specific environment. To create a global configuration file, leave the environment empty.
Click to show internal directories.
Click to hide internal directories.