From c0b69b9e098e33c231ab2bbd441a267bb6014768 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 22 Mar 2021 03:38:43 -0700 Subject: [PATCH] zero-indexing how does it work --- cmd/signaldctl/cmd/device/add/add-device.go | 2 +- cmd/signaldctl/cmd/device/list/list.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/signaldctl/cmd/device/add/add-device.go b/cmd/signaldctl/cmd/device/add/add-device.go index e9feafa..94e784b 100644 --- a/cmd/signaldctl/cmd/device/add/add-device.go +++ b/cmd/signaldctl/cmd/device/add/add-device.go @@ -44,7 +44,7 @@ var ( common.Must(cmd.Help()) log.Fatal("must a linking URI") } - uri = args[1] + uri = args[0] }, Run: func(_ *cobra.Command, args []string) { go common.Signald.Listen(nil) diff --git a/cmd/signaldctl/cmd/device/list/list.go b/cmd/signaldctl/cmd/device/list/list.go index 227829e..5fd7fbf 100644 --- a/cmd/signaldctl/cmd/device/list/list.go +++ b/cmd/signaldctl/cmd/device/list/list.go @@ -66,7 +66,7 @@ var ( case common.OutputFormatCSV, common.OutputFormatTable, common.OutputFormatDefault: t := table.NewWriter() t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{"ID", "Name", "LastSeen", "Registered"}) + t.AppendHeader(table.Row{"ID", "Name", "Last Seen", "Registered"}) for _, device := range resp.Devices { t.AppendRow(table.Row{device.ID, device.Name, device.LastSeen, device.Created}) }