Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etcdserver: remove redundant
len
check in health check
From the Go specification [1]: "1. For a nil slice, the number of iterations is 0." `len` returns 0 if the slice or map is nil [2]. Therefore, checking `len(v) > 0` around 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 <[email protected]>
- Loading branch information