Thanks for your interest in contributing! This document explains how to set up your environment, make changes, and submit pull requests.
- Development setup
- Project structure
- Coding guidelines
- Testing
- Commits and branches
- Pull requests
- Issues and feature requests
- Community standards
Prerequisites:
- Go 1.20+
- Git
make
Clone and build:
git clone https://github.com/huseynovvusal/goch.git
cd goch
make buildRun tests:
make testcmd/ # CLI entrypoints
internal/
chat/ # UDP chat send/receive, message model
config/ # Ports and app configuration
discovery/ # Presence broadcast + discovery
tui/ # Bubble Tea TUI (model/view/update)
utils/network/ # Network helpers, broadcast detection
- Use standard Go formatting:
go fmt ./... - Keep functions small and clear
- Handle errors explicitly
- Add comments for exported functions and tricky logic
- Prefer dependency-free solutions where reasonable
- Tests live next to code in the same package (
*_test.go) - Aim for happy paths + edge cases
- Keep tests deterministic; avoid network I/O in unit tests
Run all tests:
make testThe repository has automated checks in GitHub Actions (.github/workflows/ci.yml):
go fmtcheck (gofmt -l)go vetstatic checksgo test ./...coverage collectiongolangci-lint run ./...codecovupload fromcoverage.out
Also, we use Dependabot to keep go.mod dependencies updated, configured in .github/dependabot.yml.
- Base new work off
main:git checkout -b feat/short-description - Commit messages: imperative mood
- Example:
Add UDP chat listener - Example:
Fix discovery channel timeout
- Example:
- Target branch:
main - Add a clear summary + scope
- Include test plan and trouble reproduction steps
- Ensure CI passes before requesting review
- Smaller PRs are easier to review and merge
- Open GitHub issues for bugs and feature requests
- Include platform (OS), Go version, steps to reproduce, and expected behavior
Please see CODE_OF_CONDUCT.md for community behavior expectations.
Thank you for helping make Goch better! 🙏