Moved config set/unset to internal/config/modify.go as Store and Purge.
This commit is contained in:
1 parent
539e88e73c
commit
09644d0691
4 files changed
+102
-67
No files matched your search
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"strings"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/spf13/viper"
|
||||
@@ -33,6 +34,7 @@ func loadConfig(cfgFile string) error {
|
||||
LoadDefaultConfig()
|
||||
|
||||
viper.SetEnvPrefix(EnvPrefix)
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
|
||||
Reference in new issue
Block a user