config keys as objects.

This commit is contained in:
Miroslav Šedivý
2021-05-18 11:48:14 +00:00
parent b3a398d942
commit 70fb4f3bc9
2 changed files with 44 additions and 28 deletions
+2
View File
@@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/rs/zerolog"
@@ -92,6 +93,7 @@ func init() {
}
viper.SetEnvPrefix("NEKO_ROOMS")
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.AutomaticEnv() // read in environment variables that match
if err := viper.ReadInConfig(); err != nil {