Skip to content

Commit 8432eee

Browse files
committed
Add CONTRIBUTING.md and update README to include contribution guidelines
1 parent 9c1dc66 commit 8432eee

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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!

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ Run tests with:
7777
go test
7878
```
7979

80+
81+
## Contributing
82+
83+
We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on pull requests and issues, including best practices for reporting bugs and comparing with the JavaScript `qs` library.
84+
8085
## License
8186

8287
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)