This guide will help you set up the NimbusDb project on your local machine.
This project requires Go 1.25 or later.
If you work with multiple Go projects that require different Go versions, we recommend using asdf to manage Go versions.
macOS:
brew install asdfLinux:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
source ~/.bashrcWindows (using WSL/Git Bash):
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
source ~/.bashrcasdf plugin add golang# Install a specific Go version
asdf install golang 1.25.0
# Set the global Go version (applies to all projects)
asdf global golang 1.25.0
# Set the local Go version (for this project only)
asdf local golang 1.25.0
# List installed Go versions
asdf list golang
# List all available Go versions
asdf list all golang
# Show current Go version
asdf current golang
# Update Go plugin to see latest versions
asdf plugin update golangThis project already has a .tool-versions file (which asdf will automatically pickup).
From project root,
go versionShould output something like: go version go1.25.0 darwin/amd64
If you prefer a direct installation or don't need version management:
macOS:
brew install goLinux:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y golang-go
# Fedora
sudo dnf install -y golangWindows:
- Download the installer from golang.org/dl
- Run the installer and follow the prompts
- Verify installation:
go version
From Source: Follow the instructions at golang.org/doc/install/source
git clone <repository-url>
cd NimbusDbThe project uses Go modules. Dependencies will be automatically downloaded when you build or test the project.
To explicitly download dependencies:
go mod downloadTo verify dependencies are correct:
go mod verify- A sample configuration file is given
.config.yml - However secrets are recommended to be injected by a secret manager
- If you are a Connection Loops employee then doppler file is already added for you. just run
doppler setupto set it up. - To run the project with secrets being injected from doppler, run
doppler run -- go run .
go buildThis will create an executable in the current directory.
go run main.goOr if you've built it:
./NimbusDbPlease make sure to supply the needed secrets see Configuration & Secrets section above.
go test ./...go test ./configurationsgo test -v ./...# Run tests and generate coverage report
go test -cover ./...
# Generate detailed coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.outThis will open a coverage report in your browser showing which lines are covered by tests.
# Run a specific test function
go test -run TestLoad_FromYAML ./configurations
# Run tests matching a pattern
go test -run TestLoad ./configurationsFor continuous testing during development, you can use tools like:
Using entr (Linux/macOS):
# Install entr
brew install entr # macOS
# or: sudo apt-get install entr # Linux
# Watch and run tests
find . -name "*.go" | entr -c go test ./...Using air (with test configuration):
Install air for a more full-featured testing experience.
Run
gofmt -l -w .to auto-format code.
WIP