MCPcopy Create free account
hub / github.com/diillson/chatcli / envOrDefault

Function envOrDefault

cli/config_compression_mutate.go:308–313  ·  view source on GitHub ↗

envOrDefault returns the env var value or a default when unset/empty.

(key, def string)

Source from the content-addressed store, hash-verified

306
307// envOrDefault returns the env var value or a default when unset/empty.
308func envOrDefault(key, def string) string {
309 if v := strings.TrimSpace(os.Getenv(key)); v != "" {
310 return v
311 }
312 return def
313}

Callers 4

showConfigQualityMethod · 0.85
showConfigOutputMethod · 0.85
showConfigCompressionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected