mirror of
https://github.com/samber/lo.git
synced 2025-09-26 20:11:13 +08:00
chore: adding issue template (#481)
This commit is contained in:
8
.github/PULL_REQUEST_TEMPLATE/config.yml
vendored
Normal file
8
.github/PULL_REQUEST_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
template_chooser:
|
||||
enabled: true
|
||||
default: "other.md"
|
||||
choices:
|
||||
- name: "New Helper"
|
||||
file: "new_helper.md"
|
||||
- name: "Other Changes"
|
||||
file: "other.md"
|
23
.github/PULL_REQUEST_TEMPLATE/new_helper.md
vendored
Normal file
23
.github/PULL_REQUEST_TEMPLATE/new_helper.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
## Describe your changes
|
||||
|
||||
...
|
||||
|
||||
## Checklist before requesting a review
|
||||
|
||||
- [ ] 👓 I have performed a self-review of my code
|
||||
- [ ] 👶 This helper does not already exist
|
||||
- [ ] 🧪 This helper is tested
|
||||
- [ ] 🏎️ My code limits memory allocation and is fast
|
||||
- [ ] 🧞♂️ This helper is immutable and my tests prove it
|
||||
- [ ] ✍️ I implemented the parallel and mutable variants
|
||||
- [ ] 📖 My helper has been added to README
|
||||
- [ ] 🔬 An example has been added to xxxxx_example_test.go
|
||||
- [ ] ⛹️ An example has been created on https://go.dev/play
|
||||
|
||||
## Conventions
|
||||
|
||||
- Returning `(ok bool)` is often better than `(err error)`
|
||||
- `panic(...)` must be limited
|
||||
- Helpers should allow batching (eg: receive variadic arguments)
|
||||
- Use an index at the end of the helper name to declare variants (eg: `lo.Must0`, `lo.Must1`, `lo.Must2`...)
|
0
.github/PULL_REQUEST_TEMPLATE/other.md
vendored
Normal file
0
.github/PULL_REQUEST_TEMPLATE/other.md
vendored
Normal file
Reference in New Issue
Block a user