Contributing to Redigo
Contributions to Redigo are welcome. Before starting work, please review these guidelines.
Asking Questions
For general questions about how to use Redigo, the best place to ask is Stack Overflow. This allows the community to benefit from the question and its answers.
Proposing Changes
Before you start working on a new feature, bug fix, or other significant change, please open an issue on GitHub to discuss your plans. This helps ensure that your proposed change aligns with the project's goals and that your effort is not wasted.
Development Setup
To get started with developing on Redigo:
-
Clone the repository:
git clone https://github.com/gomodule/redigo.git
-
Install dependencies: The project uses Go modules. You can install testing dependencies by running:
go get -t -v ./...
Running Tests
Redigo's test suite requires a running Redis server on the default port (localhost:6379
).
To run all tests, including race detection, use the following command from the root of the repository:
go test -race ./...
Code Style and Quality
- Formatting: All Go code should be formatted with
gofmt
. The CI process checks this. - Linting: The project uses
golangci-lint
for static analysis. You can run it locally to catch potential issues before committing. - Vetting: The CI process also runs
go vet
to check for suspicious constructs.
Your changes should pass all CI checks before a pull request can be merged.