(cmd *cobra.Command, args []string)
| 159 | } |
| 160 | |
| 161 | func connDisconnectAllRun(cmd *cobra.Command, args []string) error { |
| 162 | allConns, err := getAllConnStatus() |
| 163 | if err != nil { |
| 164 | return err |
| 165 | } |
| 166 | for _, conn := range allConns { |
| 167 | if conn.Status != "connected" { |
| 168 | continue |
| 169 | } |
| 170 | err := wshclient.ConnDisconnectCommand(RpcClient, conn.Connection, &wshrpc.RpcOpts{Timeout: 10000}) |
| 171 | if err != nil { |
| 172 | WriteStdout("error disconnecting %q: %v\n", conn.Connection, err) |
| 173 | } else { |
| 174 | WriteStdout("disconnected %q\n", conn.Connection) |
| 175 | } |
| 176 | } |
| 177 | return nil |
| 178 | } |
| 179 | |
| 180 | func connConnectRun(cmd *cobra.Command, args []string) error { |
| 181 | connName := args[0] |
nothing calls this directly
no test coverage detected