diff --git a/go.mod b/go.mod index d64c5dc86..a12e1d308 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/riverqueue/river/riverdriver/riverpgxv5 v0.47.0 github.com/riverqueue/river/rivertype v0.47.0 github.com/riverqueue/rivercontrib/otelriver v0.12.0 - github.com/rodaine/table v1.3.1 + github.com/rodaine/table v1.4.0 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/sourcegraph/jsonrpc2 v0.2.3 github.com/spf13/cobra v1.10.2 diff --git a/go.sum b/go.sum index 2a4d8489f..647a89e4b 100644 --- a/go.sum +++ b/go.sum @@ -404,6 +404,8 @@ github.com/rodaine/protogofakeit v0.1.1 h1:ZKouljuRM3A+TArppfBqnH8tGZHOwM/pjvtXe github.com/rodaine/protogofakeit v0.1.1/go.mod h1:pXn/AstBYMaSfc1/RqH3N82pBuxtWgejz1AlYpY1mI0= github.com/rodaine/table v1.3.1 h1:jBVgg1bEu5EzEdYSrwUUlQpayDtkvtTmgFS0FPAxOq8= github.com/rodaine/table v1.3.1/go.mod h1:VYCJRCHa2DpD25uFALcB6hi5ECF3eEJQVhCXRjHgXc4= +github.com/rodaine/table v1.4.0 h1:sbGLYXgrc15Db32nuFRamNXP3QdfTxTxXIvdM3fsjEA= +github.com/rodaine/table v1.4.0/go.mod h1:2XS7TM7slleLUM1km5Zsr9Ks+F2p7Y8F5ycDQq2Z7hk= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= diff --git a/vendor/github.com/rodaine/table/table.go b/vendor/github.com/rodaine/table/table.go index ccd51244b..70b4bd60d 100644 --- a/vendor/github.com/rodaine/table/table.go +++ b/vendor/github.com/rodaine/table/table.go @@ -238,10 +238,13 @@ func (t *table) SetRows(rows [][]string) Table { headerLength := len(t.header) for _, row := range rows { - if len(row) > headerLength { + if len(row) >= headerLength { t.rows = append(t.rows, row[:headerLength]) } else { - t.rows = append(t.rows, row) + // pad short rows so every column is rendered, matching AddRow + padded := make([]string, headerLength) + copy(padded, row) + t.rows = append(t.rows, padded) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index b2ae7d536..167dd10de 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -835,8 +835,8 @@ github.com/riverqueue/river/rivertype # github.com/riverqueue/rivercontrib/otelriver v0.12.0 ## explicit; go 1.25.0 github.com/riverqueue/rivercontrib/otelriver -# github.com/rodaine/table v1.3.1 -## explicit; go 1.21 +# github.com/rodaine/table v1.4.0 +## explicit; go 1.23 github.com/rodaine/table # github.com/rs/zerolog v1.34.0 ## explicit; go 1.15