From f8fdabe53b361f8b78595153150ae15c52d4f3a2 Mon Sep 17 00:00:00 2001 From: "John C. Vernaleo" Date: Tue, 16 Jul 2013 16:10:35 -0400 Subject: [PATCH] Fix some error formatting from go vet. --- jsonapi.go | 4 ++-- jsonapi_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jsonapi.go b/jsonapi.go index ec66454c..37a14c12 100644 --- a/jsonapi.go +++ b/jsonapi.go @@ -781,11 +781,11 @@ func JSONToAmount(jsonAmount float64) (int64, error) { var amount int64 var err error if jsonAmount > 1.797693134862315708145274237317043567981e+300 { - err := fmt.Errorf("Error %d is too large to convert", jsonAmount) + err := fmt.Errorf("Error %v is too large to convert", jsonAmount) return amount, err } if jsonAmount < -1.797693134862315708145274237317043567981e+300 { - err := fmt.Errorf("Error %d is too small to convert", jsonAmount) + err := fmt.Errorf("Error %v is too small to convert", jsonAmount) return amount, err } tempVal := 1e8 * jsonAmount diff --git a/jsonapi_test.go b/jsonapi_test.go index 74f7bc7b..db8aa9ed 100644 --- a/jsonapi_test.go +++ b/jsonapi_test.go @@ -287,11 +287,11 @@ func TestJSONtoAmount(t *testing.T) { res, err := btcjson.JSONToAmount(tt.in) if tt.pass { if res != tt.out || err != nil { - t.Errorf("Should not fail: ", tt.in) + t.Errorf("Should not fail: %v", tt.in) } } else { if err == nil { - t.Errorf("Should not pass: ", tt.in) + t.Errorf("Should not pass: %v", tt.in) } } }