mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
fix(plugin): nilness findings (#7556)
Enable nilness linter in govet. Plugin-by-plugin rationale: - plugin/transfer: reuse error instead of shadowing it inside the for loop by declaring "ret" outside of the loop - plugin/view: remove redundant err check - plugin/dnstap: avoid possible nil dereference in error reporting path in setup test - plugin/forward: prevent nil deference or empty-slice dereference on error paths in setup test Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
@@ -52,9 +52,6 @@ func parse(c *caddy.Controller) (*View, error) {
|
||||
return v, err
|
||||
}
|
||||
v.progs = append(v.progs, prog)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
continue
|
||||
default:
|
||||
return nil, c.Errf("unknown property '%s'", c.Val())
|
||||
|
||||
Reference in New Issue
Block a user