Skip to content

Commit

Permalink
More cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
cyx committed Jan 26, 2021
1 parent b94717b commit 02e5ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions internal/cli/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ Show the tenant logs.

for {
list, err = cli.api.Log.List(
management.Query(fmt.Sprintf("log_id:[%s TO *]", lastLogID)),
management.Query(fmt.Sprintf("log_id:[* TO %s]", lastLogID)),
management.Parameter("page", "0"),
management.Parameter("per_page", "100"),
management.Parameter("sort", "date:-1"),
management.Parameter("take", "100"),
)
if err != nil {
return
Expand Down
5 changes: 1 addition & 4 deletions internal/display/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (r *Renderer) Stream(data []View, ch <-chan View) {
}

func writeTable(w io.Writer, header []string, data [][]string, ch <-chan View) {
// tableString := &strings.Builder{}
table := tablewriter.NewWriter(w)
table.SetHeader(header)

Expand Down Expand Up @@ -129,9 +128,7 @@ func writeTable(w io.Writer, header []string, data [][]string, ch <-chan View) {
}
}()

go func() {
table.ContinuousRender(strCh)
}()
go table.ContinuousRender(strCh)

<-done
}
Expand Down

0 comments on commit 02e5ed4

Please sign in to comment.