zero-indexing how does it work
This commit is contained in:
parent
a387b99e26
commit
c0b69b9e09
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ var (
|
||||||
common.Must(cmd.Help())
|
common.Must(cmd.Help())
|
||||||
log.Fatal("must a linking URI")
|
log.Fatal("must a linking URI")
|
||||||
}
|
}
|
||||||
uri = args[1]
|
uri = args[0]
|
||||||
},
|
},
|
||||||
Run: func(_ *cobra.Command, args []string) {
|
Run: func(_ *cobra.Command, args []string) {
|
||||||
go common.Signald.Listen(nil)
|
go common.Signald.Listen(nil)
|
||||||
|
|
|
@ -66,7 +66,7 @@ var (
|
||||||
case common.OutputFormatCSV, common.OutputFormatTable, common.OutputFormatDefault:
|
case common.OutputFormatCSV, common.OutputFormatTable, common.OutputFormatDefault:
|
||||||
t := table.NewWriter()
|
t := table.NewWriter()
|
||||||
t.SetOutputMirror(os.Stdout)
|
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 {
|
for _, device := range resp.Devices {
|
||||||
t.AppendRow(table.Row{device.ID, device.Name, device.LastSeen, device.Created})
|
t.AppendRow(table.Row{device.ID, device.Name, device.LastSeen, device.Created})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue