From 763b818036da8e79190a61fac2c9710b37364b1c Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 16 Dec 2022 18:28:35 +0900 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 387312d..a002589 100644 --- a/config/config.go +++ b/config/config.go @@ -103,7 +103,12 @@ func GetOpenAiApiKey() *string { } func getEnv(key string) *string { - value := os.Getenv(strings.ToUpper(key)) + value := os.Getenv(key) + + if len(value) == 0 { + value = os.Getenv(strings.ToUpper(key)) + } + if config == nil { return nil }