(cmd *cobra.Command, args []string)
| 102 | } |
| 103 | |
| 104 | func 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 | |
| 125 | func connReinstallRun(cmd *cobra.Command, args []string) error { |
| 126 | if len(args) != 1 { |
nothing calls this directly
no test coverage detected