Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/list/gates/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"strings"
"text/tabwriter"

"golang.org/x/term"

semver "github.com/hashicorp/go-version"
consolesize "github.com/nathan-fiscaletti/consolesize-go"
Comment thread
amandahla marked this conversation as resolved.
v1 "github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -184,7 +185,10 @@ func run(_ *cobra.Command, _ []string) {
}

// Create the writer that will be used to print the tabulated results:
cols, _ := consolesize.GetConsoleSize()
cols, _, err := term.GetSize(int(os.Stdout.Fd()))
if err != nil || cols <= 0 {
cols = 80
}
descriptionSize := float64(cols) * 0.30
writer := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', 0)
fmt.Fprintln(writer, "Gate Description\tSTS\tOCP Version\tDocumentation URL\t")
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ require (
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-version v1.9.0
github.com/nathan-fiscaletti/consolesize-go v0.0.0-20210105204122-a87d9f614b9d
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/gomega v1.42.1
github.com/openshift-online/ocm-api-model/clientapi v0.0.461
Expand Down Expand Up @@ -124,7 +123,7 @@ require (
golang.org/x/net v0.56.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/term v0.45.0 // indirect
golang.org/x/term v0.45.0
golang.org/x/text v0.40.0
golang.org/x/tools v0.47.0 // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs
github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nathan-fiscaletti/consolesize-go v0.0.0-20210105204122-a87d9f614b9d h1:PQW4Aqovdqc9efHl9EVA+bhKmuZ4ME1HvSYYDvaDiK0=
github.com/nathan-fiscaletti/consolesize-go v0.0.0-20210105204122-a87d9f614b9d/go.mod h1:cxIIfNMTwff8f/ZvRouvWYF6wOoO7nj99neWSx2q/Es=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/onsi/ginkgo/v2 v2.32.0 h1:Hw7s2pVrQo/8Yz5N77qdnpHaoc+c6cC9WIV1Jce+J6E=
github.com/onsi/ginkgo/v2 v2.32.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
Expand Down
21 changes: 0 additions & 21 deletions vendor/github.com/nathan-fiscaletti/consolesize-go/LICENSE

This file was deleted.

30 changes: 0 additions & 30 deletions vendor/github.com/nathan-fiscaletti/consolesize-go/README.md

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ github.com/mtibben/percent
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
## explicit
github.com/munnerz/goautoneg
# github.com/nathan-fiscaletti/consolesize-go v0.0.0-20210105204122-a87d9f614b9d
## explicit
github.com/nathan-fiscaletti/consolesize-go
# github.com/onsi/ginkgo/v2 v2.32.0
## explicit; go 1.25.0
github.com/onsi/ginkgo/v2
Expand Down