{{ ossHeader }}
Thank you for taking your time to contribute to our Go SDK! This guide will provide you information to start your own development and testing. Happy coding 💃
If you've found a bug, or have a suggestion, please open an issue in our project.
If you want to submit a change, please submit a pull request to our project. Use the normal Github pull request process. Please run make precommit
before submitting your pull request; see below for more information.
Our minimum supported Go version is currently 1.18
. You can download it from go.dev.
To make development easier, we provide a Makefile to do common development tasks. If you're on Windows, you can get make
by installing Windows Subsystem for Linux (WSL).
Run make install-devtools
. This will install...
- goimports
- staticcheck
- gingko for testing
As a post-setup test, run ginkgo
from the command line. If the program is not found, try adding go to the path as follows:
export PATH=$PATH:$(go env GOPATH)/bin
And retry running ginkgo
. If that works, then add the above line to your shell profile.
Running make precommit
will run all formatters, linters, and the tests. Run this before submitting a PR to ensure the code passes tests and follows our project conventions.
make test
will just run the testsmake lint
will just run the formatting and linters
We use Ginkgo and Gomega to write our tests.
Integration tests require an auth token for testing. Set the env var MOMENTO_API_KEY
to provide it, you can get this from your ~/.momento/credentials
file.
Then run make test
.
{{ ossFooter }}