Testing the Go Package
Explore testing a Go package by building a command-line utility that manages user data in a Postgres database. Understand how to connect, add, update, and delete users using Go functions and structures to verify package functionality and database integration.
We'll cover the following...
We'll cover the following...
The postGo.go utility
In order to test the package, we must develop a command-line utility called postGo.go.
Note: Because
postGo.gouses an external package, even if we develop that package, we should not forget to download the latest version of that external package usinggo getorgo get -u.
Because postGo.go is used for testing purposes only, we hardcoded most of the data apart from the username of the user we put into ...