Tabwriter

Using tabwriter to improve on cobra’s help information

2020-02-27

If you’ve been following the blog, you know that I’m a fan of cobra as a CLI library. Let me share how I use tabwriter to compliment cobra’s autogenerated help information. For reference, you can check this post as well. The following code is a copy (not an exact copy) of one of the tools that I use at work. It will look something like this. Trigger a manual run, among other tools.

Cobra · Golang · Tabwriter

1 minute