Summary
This chapter was about working with environment variables, command line arguments, reading and writing plain text files, traversing file systems, working with JSON data, and creating powerful command line utilities using cobra
. This is one of the most important chapters of this book because you cannot create any real-world utility without interacting with the operating system as well as the file system, and without reading and saving data.
The next chapter is about concurrency in Go, with the main subjects being goroutines, channels, and data sharing with safety. We are also going to talk about UNIX signal handling, as Go uses channels and goroutines for this purpose.