]> Cypherpunks repositories - gostls13.git/commit
src/go/doc: in Examples, check for len of params.List, not nilness
authorMichael Matloob <matloob@golang.org>
Mon, 16 Dec 2019 22:20:02 +0000 (17:20 -0500)
committerMichael Matloob <matloob@golang.org>
Tue, 17 Dec 2019 17:51:29 +0000 (17:51 +0000)
commit4b21702fdcd17aee6a52a74cc68c7c9b0ed1b7e3
tree71bfa83ab13341fa7ff14279e193e1b59281abd9
parenta5bfd9da1d1b24f326399b6b75558ded14514f23
src/go/doc: in Examples, check for len of params.List, not nilness

This makes the check the same as the one in the tests vet check.
It's safer to check the number of arguments rather than for a nil
slice.

Change-Id: I8e04e9c612573f334770c1c4245238649656c6e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/211598
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/go/doc/example.go