mirror of
https://github.com/mainnika/nikita-tokarch-uk.git
synced 2026-05-25 01:03:35 +00:00
Read config file values from yaml
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
viper.SetConfigFile(viper.GetString("config"))
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
logrus.Debugf("Skip invalid config file %s, %v", viper.ConfigFileUsed(), err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user