summaryrefslogtreecommitdiffstats
path: root/cmd/ship/list.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ship/list.go')
-rw-r--r--cmd/ship/list.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/cmd/ship/list.go b/cmd/ship/list.go
index a10b2ca..af5baf8 100644
--- a/cmd/ship/list.go
+++ b/cmd/ship/list.go
@@ -37,7 +37,7 @@ func runList(cmd *cobra.Command, args []string) error {
37 } 37 }
38 38
39 w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) 39 w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0)
40 fmt.Fprintln(w, "NAME\tTYPE\tDOMAIN\tPORT") 40 fmt.Fprintln(w, "NAME\tTYPE\tVISIBILITY\tDOMAIN\tPORT")
41 for name, app := range apps { 41 for name, app := range apps {
42 port := "" 42 port := ""
43 if app.Type == "app" || app.Type == "git-app" { 43 if app.Type == "app" || app.Type == "git-app" {
@@ -47,7 +47,14 @@ func runList(cmd *cobra.Command, args []string) error {
47 if domain == "" { 47 if domain == "" {
48 domain = "-" 48 domain = "-"
49 } 49 }
50 fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", name, app.Type, domain, port) 50 visibility := ""
51 if app.Repo != "" {
52 visibility = "private"
53 if app.Public {
54 visibility = "public"
55 }
56 }
57 fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", name, app.Type, visibility, domain, port)
51 } 58 }
52 w.Flush() 59 w.Flush()
53 return nil 60 return nil