Thank you for your interest in contributing to DNSControl! This guide will help you get started.
- Go 1.26+ (see
go.modfor the exact version) - golangci-lint (optional, used by CI and
bin/generate-all.sh) - staticcheck (optional, used by
bin/generate-all.sh)
Build the binary:
go build .Run all unit tests:
go test ./...Run tests for a specific package:
go test ./pkg/spflib/Run a single test:
go test ./pkg/spflib/ -run TestParseQualifiedMechanismsRun the linter:
golangci-lint runRun bin/generate-all.sh from the repository root. This script handles formatting, code generation, linting, and keeping generated files in sync:
bin/generate-all.shIt runs go fmt, go generate, go mod tidy, JSON formatting, and optionally golangci-lint and staticcheck if they are installed.
Prefix your commit message title with one of the following categories:
| Prefix | Use for |
|---|---|
FEATURE: |
New functionality |
BUG: |
Bug fixes |
DOCS: |
Documentation changes |
CHORE: or MAINT: |
Maintenance, dependency updates |
BUILD: or CICD: |
CI/CD and build changes |
REFACTOR: |
Code refactoring |
TEST: |
Test additions or changes |
PROVIDERNAME: |
Provider-specific changes (e.g. CLOUDFLAREAPI:, ROUTE53:) |
These prefixes are used by GoReleaser to categorize the release changelog. See .goreleaser.yml for the full list of recognized patterns.
Integration tests run real DNS operations against a provider's API. They require credentials and a dedicated test zone. See the integration test documentation for setup instructions.
go test ./integrationTest/ -v -args -provider PROVIDERNAMESee Writing new DNS providers for a step-by-step guide on implementing a new DNS provider.
Additional developer resources are available in the developer info section of the documentation.