MCPcopy
hub / github.com/grpc/grpc-go / getEnv

Function getEnv

stats/opentelemetry/csm/pluginoption.go:167–172  ·  view source on GitHub ↗

getEnv returns "unknown" if environment variable is unset, the environment variable otherwise.

(name string)

Source from the content-addressed store, hash-verified

165// getEnv returns "unknown" if environment variable is unset, the environment
166// variable otherwise.
167func getEnv(name string) string {
168 if val, ok := os.LookupEnv(name); ok {
169 return val
170 }
171 return "unknown"
172}
173
174var (
175 // This function will be overridden in unit tests.

Callers 2

constructMetadataFromEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected