Read config file values from yaml

pull/1/head
Nikita Tokarchuk 3 years ago
parent 1105ce3ebd
commit 4dd55ccc78
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 14
      frontend/main.go

@ -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)
}
}
Loading…
Cancel
Save