Get the latest tech news
Go for Bash Programmers – Part II: CLI Tools
Go for Bash programmers II - CLI tools. Contribute to go-monk/from-bash-to-go-part-ii development by creating an account on GitHub.
Since the program is not complex we don't have to think a lot about its design and can easily start with a test: In Go you can achieve similar functionality by using the standard library interface called io.Writer(that is the Writer from the io package): Or more precisely it can be any type that implements the io.Writer interface, i.e. has a function with the Write(p []byte) (int, error) signature attached.
Or read this on Hacker News