🧱 auto env config for viper

This commit is contained in:
warjiang
2023-06-15 12:19:35 +08:00
parent 9ba3a1e89e
commit 78b43bd894

View File

@@ -4,6 +4,7 @@ import (
"context" "context"
"flag" "flag"
"fmt" "fmt"
"github.com/spf13/viper"
"github.com/stulzq/azure-openai-proxy/azure" "github.com/stulzq/azure-openai-proxy/azure"
"log" "log"
"net/http" "net/http"
@@ -22,6 +23,7 @@ var (
) )
func main() { func main() {
viper.AutomaticEnv()
parseFlag() parseFlag()
azure.Init() azure.Init()