Skip to content

Commit f326423

Browse files
committed
venconn: bug: the err from NewVenConnClient was shadowed by a local copy
I caught this thanks to golangci-lint's ineffassign which showed the warning "ineffectual assignment to err".
1 parent 1487f36 commit f326423

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/agent/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ func getConfiguration(log *log.Logger, cfg Config, flags AgentCmdFlags) (Config,
354354
log.Printf(`ignoring venafi-cloud.uploader_id. In Venafi Connection mode, this field is not needed.`)
355355
}
356356

357-
restCfg, err := kubeconfig.LoadRESTConfig("")
357+
var restCfg *rest.Config
358+
restCfg, err = kubeconfig.LoadRESTConfig("")
358359
if err != nil {
359360
return Config{}, nil, fmt.Errorf("failed to load kubeconfig: %w", err)
360361
}

0 commit comments

Comments
 (0)