kubeadm: remove utilerros pkg in favor of []error

parent 7249ba28
...@@ -22,7 +22,6 @@ go_library( ...@@ -22,7 +22,6 @@ go_library(
"//test/e2e_node/system:go_default_library", "//test/e2e_node/system:go_default_library",
"//vendor:github.com/PuerkitoBio/purell", "//vendor:github.com/PuerkitoBio/purell",
"//vendor:github.com/blang/semver", "//vendor:github.com/blang/semver",
"//vendor:k8s.io/apimachinery/pkg/util/errors",
], ],
) )
......
...@@ -38,7 +38,6 @@ import ( ...@@ -38,7 +38,6 @@ import (
"net/url" "net/url"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
"k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/api/validation"
...@@ -343,12 +342,11 @@ func (sysver SystemVerificationCheck) Check() (warnings, errors []error) { ...@@ -343,12 +342,11 @@ func (sysver SystemVerificationCheck) Check() (warnings, errors []error) {
} }
} }
err := utilerrors.NewAggregate(errs) if len(errs) != 0 {
if err != nil {
// Only print the output from the system verification check if the check failed // Only print the output from the system verification check if the check failed
fmt.Println("[preflight] The system verification failed. Printing the output from the verification:") fmt.Println("[preflight] The system verification failed. Printing the output from the verification:")
bufw.Flush() bufw.Flush()
return warns, []error{err} return warns, errs
} }
return warns, nil return warns, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment