|
| 1 | +# Contributing to go-qs |
| 2 | + |
| 3 | +Thank you for your interest in contributing to **go-qs**! We welcome pull requests and issues to help improve this library. |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +### Pull Requests |
| 8 | +- Fork the repository and create your branch from `main`. |
| 9 | +- Write clear, concise commit messages. |
| 10 | +- Add tests for new features or bug fixes. |
| 11 | +- Ensure your code passes all tests (`go test`). |
| 12 | +- Document your changes in the README if needed. |
| 13 | +- Reference related issues in your PR description. |
| 14 | +- Example: If you add support for a new query format, include a sample query and expected output. |
| 15 | +- If your change is inspired by or compared to the JavaScript `qs` library, mention the relevant behavior and differences. |
| 16 | + |
| 17 | +### Issues |
| 18 | +- Search for existing issues before opening a new one. |
| 19 | +- When reporting a bug, include: |
| 20 | + - Example query string |
| 21 | + - Expected output (in Go and, if possible, in JavaScript `qs`) |
| 22 | + - Actual output |
| 23 | + - Environment details (Go version, OS, etc.) |
| 24 | +- For feature requests, describe the use case and, if relevant, how it works in the JavaScript `qs` library. |
| 25 | + |
| 26 | +#### Example Issue Template |
| 27 | +``` |
| 28 | +**Query:** |
| 29 | +user[name]=Alice&user[age]=30 |
| 30 | +
|
| 31 | +**Raised (go-qs):** |
| 32 | +map[user:map[age:30 name:Alice]] |
| 33 | +
|
| 34 | +**Expected (JavaScript qs):** |
| 35 | +{ user: { name: 'Alice', age: '30' } } |
| 36 | +... |
| 37 | +
|
| 38 | +**Environment:** |
| 39 | +goqs module version: v0.1.0 |
| 40 | +Go version: go1.21.0 |
| 41 | +OS: macOS |
| 42 | +``` |
| 43 | + |
| 44 | +## Code Style |
| 45 | +- Follow Go conventions and idioms. |
| 46 | +- Use `gofmt` before submitting. |
| 47 | + |
| 48 | +## Questions |
| 49 | +If you have questions, open an issue or start a discussion. |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +Thank you for helping make go-qs better! |
0 commit comments