Files
my-rook-config/pkg/operator/ceph/test
Eng Zer Jun 77bff6a07c core: remove redundant len check
From the Go specification [1]:

  "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 [2]. Therefore, checking
`len(v) > 0` before a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-05 20:16:46 +08:00
..
2023-10-05 20:16:46 +08:00
2023-05-30 11:52:26 -06:00
2020-07-16 15:54:42 -06:00
2022-07-07 18:10:47 -04:00