| description | development-workflow |
| name | development-workflow |
| user_invocable | false |
Development Workflow
Development Workflow
Prerequisites
- Go 1.18+ (required for generics support)
- poly (for linting and formatting)
- golangci-lint (for linting)
Initial Setup
cd /Users/naamanhirschfeld/workspace/go-utils
go mod download
poly fmt --check . && poly lint .
Running Tests
go test ./... -v -cover
go test ./sliceutils -v
go test ./maputils -v
go test ./dateutils -v
go test ./stringutils -v
go test ./structutils -v
go test ./urlutils -v
Important: 100% test coverage is mandatory for all contributions. Each utility package has a corresponding _test.go file that must be updated when adding new functions.
Linting
golangci-lint run
golangci-lint run --fix
Commit Convention
This project enforces Conventional Commits via poly:
git commit -m "feat: add new Map function to sliceutils"
git commit -m "fix: correct edge case in dateutils.Overlap"
git commit -m "docs: update contributing guide"
git commit -m "test: add coverage for stringutils.Capitalize"
CI Pipeline
The project uses GitHub Actions (.github/workflows/ci.yaml and .github/workflows/docs.yaml) to:
- Run tests across multiple Go versions
- Check code coverage
- Run linters
- Build and deploy documentation to GitHub Pages
- Analyze code quality with SonarCloud