Persistent Storage with gob
This lesson explains how to build persistent storage for the application.
We'll cover the following...
When the goto
process (the web-server on a port) ends, and this has to happen sooner or later, the map with the shortened URLs in memory will be lost. To preserve our map data, we need to save them to a disk file. We will modify URLStore
so that it writes its data to a file, and restores that data on goto
start-up. For this, we will use Go’s encoding/gob
...