fix: handle underscores in environment variables correctly

pull/5543/head^2
Johnny 4 months ago
parent f827296d6b
commit a69056a1c2

@ -7,6 +7,7 @@ import (
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"github.com/spf13/cobra"
@ -131,6 +132,7 @@ func init() {
}
viper.SetEnvPrefix("memos")
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
viper.AutomaticEnv()
}

Loading…
Cancel
Save