I personally prefer clicking a button than typing, but it feels so wrong feeling that way. I understand that certain UI tools enable us to do certain tasks quicker than using the CLI that's available for that tool, most UI tools don't have that flexibility that the CLI has. Unless you had to purchase the commercial version of that tool which usually has all what the CLI does in an attractive graphical manner, its better to use the CLI in order to get the full potential out of the tools.
That being said totally unrelated to the above, I started to look into Cobra and Viper recently. Two Go libraries (frameworks whatever you may call them) that help you build your own CLI (yey!).
Go Cobra
The Go documentation stated that Go could be used to create CLI tools and in fact there are several production level usages. Cobra and Viper helps create our own CLI tools.
The official documentation is a bit short so I had to check other available repositories on Github that had used Cobra to get an idea. Found this example repository by Adron Hall.
Here is a small app that I tried.
I want to see how much I would earn in 5 years, for an annual int. rate of 11.5% for a present amount of 500,000 (compounds once a year).
This is a simple CLI, hope to check out what else Cobra could do.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.