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

Function SliceToEnv

pkg/util/envutil/envutil.go:71–81  ·  view source on GitHub ↗
(env []string)

Source from the content-addressed store, hash-verified

69}
70
71func SliceToEnv(env []string) string {
72 var sb strings.Builder
73 for _, envVar := range env {
74 if len(envVar) == 0 {
75 continue
76 }
77 sb.WriteString(envVar)
78 sb.WriteByte('\x00')
79 }
80 return sb.String()
81}
82
83func EnvToSlice(envStr string) []string {
84 envLines := strings.Split(envStr, "\x00")

Callers 1

FixupWaveZshHistoryFunction · 0.92

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected