[kubeadm/app/..add other packages]Switch to github.com/pkg/errors

This commit is contained in:
qingsenLi
2018-11-09 18:54:03 +08:00
parent 66989e8bf3
commit e94dd19e03
12 changed files with 133 additions and 117 deletions

View File

@@ -18,11 +18,11 @@ package preflight
import (
"bytes"
"fmt"
"io/ioutil"
"strings"
"testing"
"github.com/pkg/errors"
"github.com/renstrom/dedent"
"net/http"
@@ -173,12 +173,12 @@ func (pfct preflightCheckTest) Name() string {
return "preflightCheckTest"
}
func (pfct preflightCheckTest) Check() (warning, errors []error) {
func (pfct preflightCheckTest) Check() (warning, errorList []error) {
if pfct.msg == "warning" {
return []error{fmt.Errorf("warning")}, nil
return []error{errors.New("warning")}, nil
}
if pfct.msg != "" {
return nil, []error{fmt.Errorf("fake error")}
return nil, []error{errors.New("fake error")}
}
return
}