16 lines
255 B
Go
16 lines
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()
|
||
|
}
|