MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / printRemotes

Function printRemotes

cli/cmd/host/host-list.go:48–63  ·  view source on GitHub ↗

打印 service 列表

(remotes []workspace.RemoteInfo)

Source from the content-addressed store, hash-verified

46
47// 打印 service 列表
48func 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
65func init() {
66

Callers 1

host-list.goFile · 0.85

Calls 2

entryptionKey4HostFunction · 0.85
InfoMethod · 0.80

Tested by

no test coverage detected