First off, thanks for taking the time to contribute! 🎉
The following is a set of guidelines for contributing to wirekit. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
This project and everyone participating in it is governed by our commitment to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, error messages)
- Describe the expected behavior
- Include your Go version (
go version) - Include your OS and version
Enhancement suggestions are welcome! Please provide:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- Provide code examples if applicable
- Fork the repository and create your branch from
main - Make your changes following our style guidelines
- Add tests for any new functionality
- Ensure all tests pass (
go test ./...) - Run linters (
golangci-lint run) - Update documentation if needed
- Submit your pull request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/wirekit.git
cd wirekit
# Add upstream remote
git remote add upstream https://github.com/yigithankarabulut/wirekit.git
# Install dependencies
go mod download
# Run tests
go test -v ./...
# Run linter
golangci-lint run- Follow the official Go Code Review Comments
- Run
go fmt ./...before committing - Run
go vet ./...to check for issues - Use meaningful variable and function names
- Add comments for exported functions and types (GoDoc)
- Keep functions focused and small
- Each package should have a clear, single responsibility
- Use interfaces for flexibility and testability
- Follow the builder pattern for configuration (as established in the project)
- Provide sensible defaults (Convention over Configuration)
- Write unit tests for all new functionality
- Use table-driven tests where appropriate
- Aim for meaningful test coverage
- Test both success and error cases
Example:
func TestSomething(t *testing.T) {
tests := []struct {
name string
input string
want string
wantErr bool
}{
{"valid input", "hello", "HELLO", false},
{"empty input", "", "", true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := Something(tt.input)
if (err != nil) != tt.wantErr {
t.Errorf("Something() error = %v, wantErr %v", err, tt.wantErr)
return
}
if got != tt.want {
t.Errorf("Something() = %v, want %v", got, tt.want)
}
})
}
}We use Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools
feat(redis): add cluster support
fix(postgres): handle connection timeout properly
docs: update README with new examples
test(jwt): add validation edge cases
chore: update dependencies
Use package names as scope: postgres, redis, kafka, log, jwt, etc.
Feel free to open an issue with the "question" label if you have any questions about contributing.
Thank you for contributing! 🙏