mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-18 07:34:12 +00:00
kubeadm: fix golint warnings for redundant ifs
When golint is run against kubeadm it reports severel warnings like redundant if ...; err != nil check, just return error instead. Fix the warnings by just returning error.
This commit is contained in:
@@ -59,11 +59,7 @@ func CreatePKIAssets(cfg *kubeadmapi.InitConfiguration) error {
|
||||
fmt.Printf("[certs] valid certificates and keys now exist in %q\n", cfg.CertificatesDir)
|
||||
|
||||
// Service accounts are not x509 certs, so handled separately
|
||||
if err := CreateServiceAccountKeyAndPublicKeyFiles(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return CreateServiceAccountKeyAndPublicKeyFiles(cfg)
|
||||
}
|
||||
|
||||
// CreateServiceAccountKeyAndPublicKeyFiles create a new public/private key files for signing service account users.
|
||||
|
Reference in New Issue
Block a user