Summary
In this chapter, we gained an understanding of how Go views and uses file permissions. We learned that file permissions can be represented as symbolic and octal notations. We discovered that the Go standard library has built-in support for opening, reading, writing, creating, deleting, and appending data to a file. We looked at the flag
package and how it provides functionality to create command-line applications to accept arguments.
Using the flag
package, we could also print out usage
statements that pertained to our command-line application.
Then, we demonstrated how OS signals can impact our Go program; however, by using the Go standard library, we can capture OS signals and, if applicable, control how we want to exit our program.
We also learned that Go has a standard library for working with CSV files. In our previous work with files, we saw that we can also work with files that are structured as CSV files. That Go CSV package provides the ability to iterate...