17 lines
570 B
Go
17 lines
570 B
Go
// Code generated by go-omni api. DO NOT EDIT.
|
|
package config
|
|
|
|
import omniConfig "git.yuntuo.hk/k2safe/go-omni/config"
|
|
|
|
// Load is maintained by the generator. Extend Config/Default/Validate in
|
|
// config.go, or NewLoader in loader.go; do not duplicate the loading pipeline.
|
|
func Load(path string) (Config, error) {
|
|
loader, err := NewLoader()
|
|
if err != nil {
|
|
return Config{}, err
|
|
}
|
|
return omniConfig.LoadProject(path, Default(), omniConfig.EnvOptions{
|
|
Prefix: "GO_OMNI_", Empty: "ignore", Aliases: omniConfig.ServerEnvAliases("GO_OMNI_", "server"),
|
|
}, loader)
|
|
}
|