MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / getCustomEnvValue

Function getCustomEnvValue

util/user_agent_builder.go:64–71  ·  view source on GitHub ↗

getCustomEnvValue reads value from custom environment variable with validation

()

Source from the content-addressed store, hash-verified

62
63// getCustomEnvValue reads value from custom environment variable with validation
64func getCustomEnvValue() string {
65 value := os.Getenv("MULTIAPPS_USER_AGENT_SUFFIX")
66 if value == "" {
67 return ""
68 }
69
70 return sanitizeUserAgentSuffix(value)
71}
72
73// sanitizeUserAgentSuffix sanitizes the user agent suffix
74func sanitizeUserAgentSuffix(value string) string {

Callers 1

BuildUserAgentFunction · 0.85

Calls 1

sanitizeUserAgentSuffixFunction · 0.85

Tested by

no test coverage detected