-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Go
By :

It is time to update the statistics application. The new version of the statistics utility has the following improvements:
main()
function and improve the overall design.But first, we need to learn how to work with CVS files in Go, which is the subject of the next subsection.
Most of the time, you do not want to lose your data or have to begin without any data every time you execute your application. There exist many techniques for doing so—the easiest one is by saving your data locally. A very easy-to-work-with plain text file format is CSV, which is what is explained here and used in the statistics application later on.
The good thing is that Go provides a dedicated package for working with CSV data, named encoding/csv
(https://pkg.go.dev/encoding/csv). For the presented utility, both the...