MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / CacheAndRemoveEnvVars

Function CacheAndRemoveEnvVars

pkg/wcloud/wcloud.go:52–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50const PingUrl = "/ping"
51
52func CacheAndRemoveEnvVars() error {
53 WCloudEndpoint_VarCache = os.Getenv(WCloudEndpointVarName)
54 err := checkEndpointVar(WCloudEndpoint_VarCache, "wcloud endpoint", WCloudEndpointVarName)
55 if err != nil {
56 return err
57 }
58 os.Unsetenv(WCloudEndpointVarName)
59 WCloudPingEndpoint_VarCache = os.Getenv(WCloudPingEndpointVarName)
60 os.Unsetenv(WCloudPingEndpointVarName)
61 return nil
62}
63
64func checkEndpointVar(endpoint string, debugName string, varName string) error {
65 if !wavebase.IsDevMode() {

Callers 1

grabAndRemoveEnvVarsFunction · 0.92

Calls 1

checkEndpointVarFunction · 0.85

Tested by

no test coverage detected