aboutsummaryrefslogtreecommitdiffstats
path: root/cmd-sdks.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-10-22 23:06:02 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-10-22 23:06:02 +0200
commit0012c3c7b256df7db834080740d8fc124c9dba22 (patch)
treead588fab2f8fec22060f270dc4e7a0a37335495d /cmd-sdks.go
parent5b9b7280b3b812f596de2cbdebce5c5877c7f50e (diff)
Display new image url field with sdk list command
Change-Id: I26db1f7ebedd502db123e249a69bad30fbc0db99 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'cmd-sdks.go')
-rw-r--r--cmd-sdks.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd-sdks.go b/cmd-sdks.go
index 35b053e..0005215 100644
--- a/cmd-sdks.go
+++ b/cmd-sdks.go
@@ -187,7 +187,8 @@ func _displaySdks(sdks []xaapiv1.SDK, verbose bool, all bool, filter string) {
fmt.Fprintln(writer, "Version\t"+s.Version)
fmt.Fprintln(writer, "Status\t"+s.Status)
fmt.Fprintln(writer, "Path\t"+s.Path)
- fmt.Fprintln(writer, "Url\t"+s.URL)
+ fmt.Fprintln(writer, "Url\t"+formatURL(s.URL))
+ fmt.Fprintln(writer, "Image Url\t"+formatURL(s.ImageURL))
} else {
if first {
@@ -365,3 +366,10 @@ func sdksAbort(ctx *cli.Context) error {
Log.Debugf("Result of %s: %v", url, newSdk)
return nil
}
+
+func formatURL(u string) string {
+ if u == "" {
+ return "-"
+ }
+ return u
+}