From the Go specification:
> "1. For a nil slice, the number of iterations is 0."
https://go.dev/ref/spec#For_range
Therefore, an additional nil check for before the loop is unnecessary.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
pull/26697/head^2
Eng Zer Jun2023-08-29 19:03:43 +07:00committed byGitHub