16 lines
No EOL
255 B
Go
16 lines
No EOL
255 B
Go
package config
|
|
|
|
import "github.com/spf13/viper"
|
|
|
|
func init() {
|
|
viper.SetConfigName("config")
|
|
viper.AddConfigPath(".")
|
|
viper.SetConfigType("yaml")
|
|
viper.AutomaticEnv()
|
|
viper.ReadInConfig()
|
|
}
|
|
|
|
|
|
func GetConfig() *viper.Viper {
|
|
return viper.GetViper()
|
|
} |