-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1afdebf
commit ac824bb
Showing
4 changed files
with
237 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
.vscode | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
# Benchmark comparison files | ||
old_benchmarks.txt | ||
new_benchmarks.txt | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
# Coverage output | ||
coverage.out | ||
coverage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. | ||
|
||
However, we do not collaborate with individuals or organizations that support aggression against Ukraine or commit actions that violate human rights and international law. We stand with all those affected by such conflicts and strive to promote peace, respect, and the protection of all people. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment: | ||
|
||
- Using welcoming and inclusive language | ||
- Demonstrating empathy and kindness toward other people | ||
- Being respectful of differing opinions, viewpoints, and experiences | ||
- Giving and gracefully accepting constructive feedback | ||
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience | ||
- Focusing on what is best not just for us as individuals, but for the overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
- The use of sexualized language or imagery, and sexual attention or advances of any kind | ||
- Trolling, insulting, or derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information without their explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and it also applies when an individual is officially representing the community in public spaces. | ||
|
||
Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible. | ||
|
||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Enforcement Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. | ||
|
||
This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. | ||
|
||
No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violating community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). | ||
|
||
Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Contributing | ||
|
||
We love your input! We want to make contributing to this repository as simple and transparent as possible, be it: | ||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
|
||
## Code of Conduct | ||
|
||
Please note that this project has a Code of Conduct (see CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms. We are committed to providing a welcoming and inclusive environment for all contributors. | ||
|
||
## Development Process | ||
|
||
1. Fork the repo and create your branch from `master`. | ||
2. Make your changes. | ||
3. If you've added code, add tests. | ||
4. Ensure the test suite passes. | ||
5. Update benchmarks if necessary. | ||
6. Create a pull request. | ||
|
||
## Testing Your Changes | ||
|
||
### Running Tests | ||
|
||
Run all tests to ensure nothing breaks: | ||
```bash | ||
go test ./... | ||
``` | ||
|
||
### Test Coverage | ||
|
||
Check test coverage for your changes: | ||
```bash | ||
go test -coverprofile=coverage.out | ||
go tool cover -html=coverage.out | ||
``` | ||
|
||
If your changes aren't covered by existing tests, please add appropriate test cases. We aim to maintain high test coverage to ensure code reliability. | ||
|
||
### Performance Testing | ||
|
||
If your changes might affect performance, you should compare benchmarks: | ||
|
||
1. First, run benchmarks on the `master` branch: | ||
```bash | ||
git checkout master | ||
go test -bench=. -benchmem > /tmp/old_benchmarks.txt | ||
``` | ||
|
||
2. Then, switch to your branch and run the same benchmarks: | ||
```bash | ||
git checkout your-branch | ||
go test -bench=. -benchmem > /tmp/new_benchmarks.txt | ||
``` | ||
|
||
3. Install benchstat if you haven't already: | ||
```bash | ||
go install golang.org/x/perf/cmd/benchstat@latest | ||
``` | ||
|
||
4. Compare results: | ||
```bash | ||
benchstat /tmp/old_benchmarks.txt /tmp/new_benchmarks.txt | ||
``` | ||
|
||
The `benchstat` tool will show statistical analysis of the changes: | ||
- "old" column shows existing benchmark results | ||
- "new" column shows your changes | ||
- "delta" column shows the difference (negative means faster) | ||
- Statistical significance is indicated (p-value < 0.05) | ||
|
||
Example output: | ||
``` | ||
name old time/op new time/op delta | ||
JSONSmall-8 387ns ± 1% 350ns ± 2% -9.56% (p=0.008) | ||
``` | ||
|
||
This shows your changes made the JSONSmall benchmark 9.56% faster, and this improvement is statistically significant. | ||
|
||
Note: While absolute performance numbers may vary between different machines, running benchmarks on the same machine for both branches allows for meaningful relative comparisons. | ||
|
||
### Code Style | ||
|
||
- Follow standard Go code style and conventions | ||
- Use `gofmt` to format your code | ||
- Run `golint` and `go vet` to catch common issues | ||
- Add comments for exported functions and types | ||
- Update documentation if necessary | ||
|
||
### Documentation | ||
|
||
If you've added or modified functionality: | ||
1. Update relevant documentation in code comments | ||
2. Update README.md if necessary | ||
3. Update examples if applicable | ||
|
||
### Commit Messages | ||
|
||
- Use clear and meaningful commit messages | ||
- Start with a verb in imperative mood (Add, Fix, Change, etc.) | ||
- Keep the first line under 70 characters | ||
- Reference issues and pull requests where appropriate | ||
|
||
Example: | ||
``` | ||
Add gzip compression support for JSON responses | ||
- Implement transparent compression for large responses | ||
- Add compression threshold configuration | ||
- Update documentation with compression examples | ||
- Add benchmarks for compressed responses | ||
Fixes #123 | ||
``` | ||
|
||
## Pull Request Process | ||
|
||
1. Update the README.md with details of changes if applicable | ||
2. Update the documentation with details of any interface changes | ||
3. Add your changes to the CHANGELOG.md under "Unreleased" | ||
4. The PR will be merged once you have the sign-off of at least one maintainer | ||
|
||
## License | ||
|
||
By contributing, you agree that your contributions will be licensed under the same license as the original project. | ||
|
||
## Questions? | ||
|
||
Feel free to open an issue for any questions about contributing! |