This guide explains how to set up your environment, run tests, and contribute to Protoflow.
We use task (Taskfile) to automate common development tasks.
| Command | Description |
|---|---|
task lint |
Run golangci-lint to check code quality. |
task test |
Run the full test suite (go test ./...). |
task examples:<name> |
Run a specific example (e.g., task examples:simple). |
Run task --list to see all available commands.
Running brokers locally can require specific configurations:
- AWS SNS/SQS: Point
Config.AWSEndpointto your LocalStack URL. The default provider chain handles credentials (or use dummy values). - Kafka: Use a unique
KafkaConsumerGroupfor each service instance to avoid rebalancing issues during development. - RabbitMQ: The same AMQP connection is used for both publishing and subscribing. If TLS is required, supply it via
amqp.ConnectionConfig.
Our test suite covers service wiring, middleware, transports, and helpers.
Run all tests:
task test
# OR
go test ./...Run specific tests:
go test ./internal/runtime/...Check coverage: To see library coverage excluding examples:
go test $(go list ./... | grep -v '/examples/') -coverprofile=coverage.out -covermode=atomicNote: Examples are build-tested via go test ./examples/... to ensure they remain functional.