MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / getAllVariables

Function getAllVariables

cmd/wsh/cmd/wshcmd-getvar.go:110–131  ·  view source on GitHub ↗
(zoneId string)

Source from the content-addressed store, hash-verified

108}
109
110func getAllVariables(zoneId string) error {
111 commandData := wshrpc.CommandVarData{
112 ZoneId: zoneId,
113 FileName: getVarFileName,
114 }
115
116 vars, err := wshclient.GetAllVarsCommand(RpcClient, commandData, &wshrpc.RpcOpts{Timeout: 2000})
117 if err != nil {
118 return fmt.Errorf("getting variables: %w", err)
119 }
120
121 terminator := "\n"
122 if getVarNullTerminate {
123 terminator = "\x00"
124 }
125
126 for _, v := range vars {
127 WriteStdout("%s=%s%s", v.Key, v.Val, terminator)
128 }
129
130 return nil
131}

Callers 1

getVarRunFunction · 0.85

Calls 2

GetAllVarsCommandFunction · 0.92
WriteStdoutFunction · 0.85

Tested by

no test coverage detected