忽略环境变量大小写
This commit is contained in:
parent
7fa783593a
commit
763b818036
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user