MCPcopy
hub / github.com/wavetermdev/waveterm / MapToEnv

Function MapToEnv

pkg/util/envutil/envutil.go:33–42  ·  view source on GitHub ↗
(envMap map[string]string)

Source from the content-addressed store, hash-verified

31}
32
33func MapToEnv(envMap map[string]string) string {
34 var sb strings.Builder
35 for key, val := range envMap {
36 sb.WriteString(key)
37 sb.WriteByte('=')
38 sb.WriteString(val)
39 sb.WriteByte('\x00')
40 }
41 return sb.String()
42}
43
44func GetEnv(envStr string, key string) string {
45 envMap := EnvToMap(envStr)

Callers 4

SetVarCommandMethod · 0.92
runRunFunction · 0.92
SetEnvFunction · 0.85
RmEnvFunction · 0.85

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected