From e9a1badd5c7332692309142b333134a16b1af488 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 12 Oct 2016 05:52:05 -0400 Subject: [PATCH] Code refactoring --- cli/cli.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 2b9ea4b..ea903af 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -95,7 +95,7 @@ func Init() { fmtc.Println("{r}Arguments parsing errors:{!}") for _, err := range errs { - fmtc.Printf(" {r}%s{!}\n", err.Error()) + fmtc.Printf(" {r}%v{!}\n", err) } os.Exit(1) @@ -134,7 +134,7 @@ func process(args []string) { if err != nil { if !arg.GetB(ARG_FORMAT) { - fmtc.Printf("{r}%s{!}\n", err.Error()) + fmtc.Printf("{r}%v{!}\n", err) } os.Exit(1) @@ -148,7 +148,7 @@ func process(args []string) { hosts, err = readHostList(hosts[0]) if err != nil && arg.GetB(ARG_FORMAT) { - fmtc.Printf("{r}%s{!}\n", err.Error()) + fmtc.Printf("{r}%v{!}\n", err) os.Exit(1) } } @@ -220,7 +220,7 @@ func check(host string) string { ap, err := api.Analyze(host, params) if err != nil { - fmtc.Printf("{r}%s{!}\n", err.Error()) + fmtc.Printf("{r}%v{!}\n", err) return "T" } @@ -230,7 +230,7 @@ func check(host string) string { info, err = ap.Info() if err != nil { - t.Printf("{r}%s{!}\n", err.Error()) + t.Printf("{r}%v{!}\n", err) return "Err" }