package config import ( "fmt" "os" "git.sxidc.com/go-framework/baize/framework/core/application" ) type Config struct { ApplicationConfig application.Config } var conf Config func init() { configFilePath := os.Getenv("CONFIG_FILE_PATH") applicationConfig, err := application.LoadFromYamlFile(configFilePath) if err != nil { panic(err) } conf.ApplicationConfig = applicationConfig fmt.Println("Load config file finish") } func GetConfig() Config { return conf }