提交 534325e8 编写于 作者: T Thomas Stromberg

Use %v for errors instead of %s

上级 7feb46ed
......@@ -66,7 +66,7 @@ var dashboardCmd = &cobra.Command{
ns := "kube-system"
svc := "kubernetes-dashboard"
if err = util.RetryAfter(30, func() error { return service.CheckService(ns, svc) }, 1*time.Second); err != nil {
fmt.Fprintf(os.Stderr, "%s:%s is not running: %s\n", ns, svc, err)
fmt.Fprintf(os.Stderr, "%s:%s is not running: %v\n", ns, svc, err)
os.Exit(1)
}
......@@ -77,7 +77,7 @@ var dashboardCmd = &cobra.Command{
url := dashboardURL(hostPort, ns, svc)
if err = util.RetryAfter(60, func() error { return checkURL(url) }, 1*time.Second); err != nil {
fmt.Fprintf(os.Stderr, "%s is not responding properly: %s\n", url, err)
fmt.Fprintf(os.Stderr, "%s is not responding properly: %v\n", url, err)
os.Exit(1)
}
......@@ -134,7 +134,7 @@ func dashboardURL(proxy string, ns string, svc string) string {
// checkURL checks if a URL returns 200 HTTP OK
func checkURL(url string) error {
resp, err := http.Get(url)
glog.Infof("%s response: %s %+v", url, err, resp)
glog.Infof("%s response: %v %+v", url, err, resp)
if err != nil {
return errors.Wrap(err, "checkURL")
}
......
......@@ -93,7 +93,7 @@ func (m *MinikubeRunner) RunDaemon(command string) (*exec.Cmd, *bufio.Reader) {
err = cmd.Start()
if err != nil {
m.T.Fatalf("Error running command: %s %s", command, err)
m.T.Fatalf("Error running command: %s %v", command, err)
}
return cmd, bufio.NewReader(stdoutPipe)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册