In a previous article we discussed why command line applications are important and talked about few guidelines. In this article we’ll see how we can use the built-in flag package to write command line applications.
Go’s channels provide a primitive for typed, synchronous message passing. Combined with goroutines, they form the backbone of Go’s CSP-inspired concurrency model. They’re simple and expressive, but they can be difficult to use properly, especially if you need to control who can read from them or write to them.
Let me tell you a story…
In 1986 Knuth wrote a program to demonstrate literate programming.
The task was to read a file of text, determine the n most frequently used words, and print out a sorted list of those words along with their frequencies.