Ways to Contribute
There are many ways to contribute to TUIOS:- Report bugs - Open issues for bugs you encounter
- Suggest features - Share ideas for new functionality
- Submit pull requests - Fix bugs or add features
- Improve documentation - Help make the docs clearer and more comprehensive
- Share your experience - Blog posts, tutorials, and demos help grow the community
Code Contribution Workflow
1. Fork and Clone
Fork the repository on GitHub and clone your fork:2. Create a Branch
Create a feature branch for your changes:3. Make Your Changes
Write your code following the project’s coding conventions (see below).4. Test Your Changes
Ensure all tests pass and add new tests if needed:5. Commit Your Changes
Use conventional commit messages (see below):6. Push and Create a Pull Request
Push your branch and create a pull request on GitHub:Go Coding Conventions
TUIOS follows standard Go coding practices:Code Style
-
Run
go fmt- Always format your code before committing: - Follow Effective Go - Read the Effective Go guide
- Use meaningful names - Avoid single-letter variables except for loop indices
- Add package comments - Every package should have a doc comment explaining its purpose
- Document exports - All exported types, functions, and constants need godoc-style comments
Error Handling
Wrap errors with context usingfmt.Errorf:
Testing Conventions
- Use table-driven tests for multiple test cases
- Name test files with
_test.gosuffix - Use
t.Run()for subtests - Add benchmarks with
Benchmark*prefix
Commit Message Format
Use Conventional Commits format:Types
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoring (no functional changes)test:- Adding or updating testschore:- Maintenance tasks (dependencies, build scripts)perf:- Performance improvementsstyle:- Code style changes (formatting, naming)
Examples
Writing Good Commit Messages
- Use imperative mood: “add feature” not “added feature”
- Keep the subject line under 50 characters
- Capitalize the subject line
- Don’t end the subject line with a period
- Separate subject from body with a blank line
- Wrap the body at 72 characters
- Explain why not what in the body
Pull Request Process
Before Submitting
- Update documentation - Add or update relevant docs
- Add tests - Include tests for new functionality
- Run tests - Ensure
go test ./...passes - Check formatting - Run
go fmt ./... - Update CHANGELOG - Add entry if applicable
Pull Request Guidelines
- Write a clear title - Use conventional commit format
- Describe your changes - Explain what and why in the PR description
- Reference issues - Link related issues (“Fixes #123”)
- Keep PRs focused - One feature or fix per PR
- Respond to feedback - Address review comments promptly
- Update your branch - Rebase on main if needed
PR Template
Code Review Process
All pull requests require review before merging:- Automated checks - CI runs tests and linters
- Code review - Maintainers review your code
- Feedback - Address any requested changes
- Approval - Once approved, your PR will be merged
Review Timeline
Maintainers aim to review PRs within a few days. For urgent fixes, mention this in the PR.Getting Help
- GitHub Issues - Ask questions or report bugs
- Pull Request Comments - Discuss specific implementation details
- GitHub Discussions - General questions and community discussion
Code of Conduct
Be respectful and constructive:- Use welcoming and inclusive language
- Be respectful of differing viewpoints
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy towards other contributors
Additional Resources
- Architecture Guide - Technical architecture and design patterns
- Building from Source - Build instructions and requirements
- Testing Guide - How to run and write tests
- Effective Go - Go programming guide