Juneezee opened a new pull request, #611:
URL: https://github.com/apache/incubator-answer/pull/611

   From the Go specification (https://go.dev/ref/spec#For_range):
   
   > "1. For a nil slice, the number of iterations is 0."
   
   `len` returns 0 if the slice is nil (https://pkg.go.dev/builtin#len). 
Therefore, checking `len(v) > 0` around a loop is unnecessary.
   
   Example Go playground: https://go.dev/play/p/s3FZcKC8ltm


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to