15 lines
190 B
Go
15 lines
190 B
Go
|
package config
|
||
|
|
||
|
import (
|
||
|
"github.com/spf13/viper"
|
||
|
)
|
||
|
|
||
|
func InitConfig(configPath string) {
|
||
|
|
||
|
viper.SetConfigFile(configPath)
|
||
|
|
||
|
if err := viper.ReadInConfig(); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|