Updating the Application to Use the SQLite Repository
Explore how to update a Go command-line Pomodoro application to use an SQLite repository for storing interval data persistently. Learn to modify configuration flags, integrate the SQLite repository, and verify database operations using command-line tools and queries.
We'll cover the following...
We'll cover the following...
Once the SQLite repository is available, we need to update the Pomodoro application to use it.
Updating the root.go file
We update the file root.go to add a new command-line parameter that lets the user
specify the database file to use. We bind that flag with viper so the user can set
it in the configuration file as well:
Creating the init() function
We create a new file called reposqlite.go, which will ...