MCPcopy
hub / github.com/tailscale/tailscale / String

Function String

envknob/envknob.go:117–121  ·  view source on GitHub ↗

String returns the named environment variable, using os.Getenv. If the variable is non-empty, it's also tracked & logged as being an in-use knob.

(envVar string)

Source from the content-addressed store, hash-verified

115// If the variable is non-empty, it's also tracked & logged as being
116// an in-use knob.
117func String(envVar string) string {
118 v := os.Getenv(envVar)
119 noteEnv(envVar, v)
120 return v
121}
122
123// RegisterString returns a func that gets the named environment variable,
124// without a map lookup per call. It assumes that mutations happen via

Callers 15

RateLimitedFnWithClockFunction · 0.92
AllowDebugAccessFunction · 0.92
allowDebugAccessWithKeyFunction · 0.92
initFunction · 0.92
initFunction · 0.92
debugknobs.goFile · 0.92
defaultPortFunction · 0.92
runNetcheckFunction · 0.92
getControlDebugFlagsFunction · 0.92
acmeClientFunction · 0.92
validateLeafFunction · 0.92
CanFetchCertsMethod · 0.92

Calls 1

noteEnvFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…