-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch table writer to https://github.com/jedib0t/go-pretty
#2292
Comments
Looked at this for a bit, go-pretty is almost a drop in replacement. Just need to account for a few minor differences in method names, table.Row versus []string, and need to rework toTableData() in inspect.go |
Have go-pretty working for inspect, only gap is header isn't aligned center, will work on netem output and should have a pr tomorrow. MD shows vertical lines with breaks, but they are smooth on console.
|
got something in place for netem
#2296 is out for a look, should be good enough to compare with older style tables. |
* replaced tablewriter with go-pretty * variable renames * adjusts smoke test to account for different border char * add center alignment for headers * remove container ID, collapse v4/v6 addresses * squash header to 1 line * removed number col, bolded headers * combine kind/image and strip prefixlen from ip * fix ip stripping func and use the latest go-pretty to use the align functionality in the headers * topo path -> topology * added bold color * use the shortest file path when displaying the inspect --all (relative vs absolute) * fix "Ensure "inspect all" outputs IP addresses" test * wait longer for the tests running on arm/macos * do not check if nf_tables kernel module is available in /proc/modules this file might not be available on some VMs like OrbStack on macos, and the error will anyhow be detected when setting up a connection with the netlink socket * fix 02-destroy test suite * fix 05* test * fix ext container tests * change style for the netem table --------- Co-authored-by: Roman Dodin <dodin.roman@gmail.com>
done in #2296 |
Tables are much nicer with https://github.com/jedib0t/go-pretty
I like the styling of NATS CLI tables that use this library https://github.com/nats-io/natscli/blob/392437ff9524662a5cc677b06821008ccb6ef802/cli/tables.go#L28
The text was updated successfully, but these errors were encountered: