MCPcopy
hub / github.com/QuantumNous/new-api / GetEnvOrDefaultString

Function GetEnvOrDefaultString

common/env.go:21–26  ·  view source on GitHub ↗
(env string, defaultValue string)

Source from the content-addressed store, hash-verified

19}
20
21func GetEnvOrDefaultString(env string, defaultValue string) string {
22 if env == "" || os.Getenv(env) == "" {
23 return defaultValue
24 }
25 return os.Getenv(env)
26}
27
28func GetEnvOrDefaultBool(env string, defaultValue bool) bool {
29 if env == "" || os.Getenv(env) == "" {

Callers 6

getUpstreamBaseFunction · 0.92
ExchangeTokenMethod · 0.92
GetUserInfoMethod · 0.92
StartPyroScopeFunction · 0.85
InitEnvFunction · 0.85
initConstantEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected