mirror of
https://github.com/golang/go.git
synced 2025-10-25 22:04:12 +00:00
std: fix various nilness findings
Found by running $ go run golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest std No actual bugs--other than one panic(nil)--but a few places where error nilness was unclear. Change-Id: Ia916ba30f46f29c1bcf928cc62280169b922463a Reviewed-on: https://go-review.googlesource.com/c/go/+/486675 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
5c865c78c3
commit
9d35ebba06
6 changed files with 14 additions and 12 deletions
|
|
@ -93,8 +93,7 @@ func (eg *InternalExample) processRunResult(stdout string, timeSpent time.Durati
|
|||
if recovered != nil {
|
||||
// Propagate the previously recovered result, by panicking.
|
||||
panic(recovered)
|
||||
}
|
||||
if !finished && recovered == nil {
|
||||
} else if !finished {
|
||||
panic(errNilPanicOrGoexit)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue