You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This pull request is a minor code cleanup. From the Go specification (https://go.dev/ref/spec#For_range): > "1. For a nil slice, the number of iterations is 0." > "3. If the map is nil, the number of iterations is 0." `len` returns 0 if the slice or map is nil (https://pkg.go.dev/builtin#len). Therefore, checking `len(v) > 0` before a loop is unnecessary. --- At the time of writing this pull request, there wasn't a lint rule that catches these issues. The closest I could find is https://staticcheck.dev/docs/checks/#S103 Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> |
9 months ago | |
---|---|---|
.. | ||
actions | 9 months ago | |
agit | 10 months ago | |
asymkey | 9 months ago | |
attachment | 9 months ago | |
auth | 9 months ago | |
automerge | 1 year ago | |
context | 9 months ago | |
convert | 9 months ago | |
cron | 9 months ago | |
externalaccount | 9 months ago | |
feed | 9 months ago | |
forms | 9 months ago | |
gitdiff | 9 months ago | |
indexer | 10 months ago | |
issue | 9 months ago | |
lfs | 12 months ago | |
mailer | 9 months ago | |
markup | 9 months ago | |
migrations | 9 months ago | |
mirror | 9 months ago | |
notify | 10 months ago | |
org | 9 months ago | |
packages | 9 months ago | |
pull | 9 months ago | |
release | 9 months ago | |
repository | 9 months ago | |
secrets | 10 months ago | |
task | 9 months ago | |
uinotification | 9 months ago | |
user | 9 months ago | |
webhook | 9 months ago | |
wiki | 9 months ago |