Thank you for your interest in contributing to clog!
-
Fork and clone the repository:
git clone https://github.com/yourusername/clog.git cd clog -
Install dependencies:
go mod tidy
-
Run tests:
make unittest
-
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes to the code
-
Run tests to ensure everything works:
make unittest
-
Build and test the binary:
make build make test
- Follow idiomatic Go conventions
- Run
go fmton all code before committing - Add comments for exported functions and types
- Keep functions focused and testable
- Write unit tests for all new functionality
- Ensure existing tests pass before submitting
- Aim for good test coverage
- Use table-driven tests where appropriate
-
Commit your changes with descriptive commit messages:
git commit -m "Add feature: description of your changes" -
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- NEVER commit actual NATS credentials to the repository
- The
make buildprocess is designed to keep credentials out of source code .gitignoreis configured to prevent credential files from being committed- Review your changes before committing to ensure no secrets are included
When testing with real credentials:
-
Use environment variables:
export NATS_URL="your-test-url" export NATS_CREDS="/path/to/test-creds"
-
Or use a local
.envfile (which is gitignored):NATS_URL=nats://localhost:4222 NATS_CREDS=/path/to/creds
clog/
├── cmd/
│ ├── main.go # Main application code
│ └── main_test.go # Unit tests
├── Makefile # Build and development tasks
├── README.md # User documentation
├── CONTRIBUTING.md # This file
└── go.mod # Go module definition
make build- Build the binary with interactive credential promptsmake unittest- Run all unit testsmake test- Build and run manual testsmake clean- Remove build artifactsmake install- Install binary to/usr/local/binmake tidy- Rungo mod tidy
If you have questions or encounter issues, please open an issue on GitHub.
By contributing to this project, you agree that your contributions will be licensed under the Apache License, Version 2.0. See LICENSE for the full license text.