TL;DR:
make compose-test
This Go client library abstract an Account HTTP API that is simulated using this docker-compose. Aiming to be simple as possible, this project follows the same structure as decimal library. It also applies the patterns found in Uber Style Guide. This guide has useful insights about of writing Go code in general.
This project has one hundred percentage of code coverage. It could be checked with the following commands:
make unit-test
It will run unit tests in the local environment. It is necessary to have Go installed.
make it-test
It will run integration tests in the local environment. It is necessary to have Go installed and run dependencies. See make and make install.
make test
This is going to apply fmt and run both unit and integration tests.
Build application and run tests in a containerized environment is the easy way to run it isolated from environment noise. Although this is quite useful, sometimes is necessary debug the application or even debug an integration test. In this case, run the follow command pipeline:
./configure && make && make install
configure script will certificate that your environment is able to assemble the application locally. make
target will
assemble the application with go build
running go vet
, go fmt
and go lint
before it. For the last, make install
will run docker-compose with all dependencies.
This library has the basic documentation for use it, to see it in your browser:
make doc
Open your browser, it will be running in localhost address at 6060
TCP port.
To remove all docker containers downloaded and installed by this project, run:
make clean
This script will run clean.sh which is a basic shell script with a couple of docker commands.