打印 service 列表
(remotes []workspace.RemoteInfo)
| 46 | |
| 47 | // 打印 service 列表 |
| 48 | func printRemotes(remotes []workspace.RemoteInfo) { |
| 49 | if len(remotes) <= 0 { |
| 50 | common.SmartIDELog.Info(i18nInstance.Common.Warn_dal_record_not_exit) |
| 51 | return |
| 52 | } |
| 53 | w := tabwriter.NewWriter(os.Stdout, 1, 1, 1, ' ', 0) |
| 54 | fmt.Fprintln(w, i18nInstance.Host.Info_host_table_header) |
| 55 | for _, remoteInfo := range remotes { |
| 56 | entryptionKey4Host(remoteInfo) |
| 57 | |
| 58 | createTime := remoteInfo.CreatedTime.Format("2006-01-02 15:04:05") |
| 59 | line := fmt.Sprintf("%v\t%v\t%v\t%v", remoteInfo.ID, remoteInfo.Addr, remoteInfo.SSHPort, createTime) |
| 60 | fmt.Fprintln(w, line) |
| 61 | } |
| 62 | w.Flush() |
| 63 | } |
| 64 | |
| 65 | func init() { |
| 66 |
no test coverage detected