scope config variables.

This commit is contained in:
Miroslav Šedivý
2021-03-16 15:24:58 +01:00
parent a74bf9986b
commit 524d895db8
10 changed files with 107 additions and 115 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/rs/zerolog"
@ -93,6 +94,7 @@ func init() {
}
viper.SetEnvPrefix("NEKO")
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.AutomaticEnv() // read in environment variables that match
if err := viper.ReadInConfig(); err != nil {