1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

cli: define const for magic value

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-11-04 22:04:16 +01:00
parent 9fda9134a9
commit d8e76bc33f

View File

@@ -337,8 +337,10 @@ func operationSubCommands(cmd *cobra.Command) []*cobra.Command {
return cmds
}
const defaultTermWidth = 80
func wrappedFlagUsages(cmd *cobra.Command) string {
width := 80
width := defaultTermWidth
if ws, err := term.GetWinsize(0); err == nil {
width = int(ws.Width)
}