...

/

Testing the Go Package

Testing the Go Package

Let’s learn how to test the Go package.

The postGo.go utility

In order to test the package, we must develop a command-line utility called postGo.go.

Note: Because postGo.go uses an external package, even if we develop that package, we should not forget to download the latest version of that external package using go get or go get -u.

Because postGo.go is used for testing purposes only, we hardcoded most of the data apart ...