Closed alexandear closed 4 months ago
The PR removes the redundant err != nil check because err cannot be nil in that context.
err != nil
err
nil
This was found by the nilness analyzer:
nilness
❯ go install golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest ❯ go vet -vettool=$(which nilness) ./... # github.com/go-delve/delve/pkg/dwarf/loclist # [github.com/go-delve/delve/pkg/dwarf/loclist] pkg/dwarf/loclist/dwarf5_loclist.go:121:10: impossible condition: nil != nil
The PR removes the redundant
err != nil
check becauseerr
cannot benil
in that context.This was found by the
nilness
analyzer: