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

Function connStatusRun

cmd/wsh/cmd/wshcmd-conn.go:104–123  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

102}
103
104func connStatusRun(cmd *cobra.Command, args []string) error {
105 allResp, err := getAllConnStatus()
106 if err != nil {
107 return err
108 }
109 if len(allResp) == 0 {
110 WriteStdout("no connections\n")
111 return nil
112 }
113 WriteStdout("%-30s %-12s\n", "connection", "status")
114 WriteStdout("----------------------------------------------\n")
115 for _, conn := range allResp {
116 str := fmt.Sprintf("%-30s %-12s", conn.Connection, conn.Status)
117 if conn.Error != "" {
118 str += fmt.Sprintf(" (%s)", conn.Error)
119 }
120 WriteStdout("%s\n", str)
121 }
122 return nil
123}
124
125func connReinstallRun(cmd *cobra.Command, args []string) error {
126 if len(args) != 1 {

Callers

nothing calls this directly

Calls 2

getAllConnStatusFunction · 0.85
WriteStdoutFunction · 0.85

Tested by

no test coverage detected