Fix miscellaneous issues revealed by Go 1.10 (#1256)

* provider/mem: fix format verbs in tests

* api: fix format verb
This commit is contained in:
pasquier-s 2018-02-22 15:57:45 +01:00 committed by Brian Brazil
parent 0f9c9a0bb0
commit 29e441f88f
2 changed files with 3 additions and 3 deletions

View File

@ -799,7 +799,7 @@ func (api *API) respondError(w http.ResponseWriter, apiErr apiError, data interf
case errorInternal:
w.WriteHeader(http.StatusInternalServerError)
default:
panic(fmt.Sprintf("unknown error type %q", apiErr))
panic(fmt.Sprintf("unknown error type %q", apiErr.Error()))
}
b, err := json.Marshal(&response{

View File

@ -134,7 +134,7 @@ func TestAlertsSubscribe(t *testing.T) {
}
if len(expectedAlerts) != 0 {
t.Fatalf("Unexpected number of alerts: %s", len(expectedAlerts))
t.Fatalf("Unexpected number of alerts: %d", len(expectedAlerts))
}
}()
@ -158,7 +158,7 @@ func TestAlertsSubscribe(t *testing.T) {
}
if len(expectedAlerts) != 0 {
t.Fatalf("Unexpected number of alerts: %s", len(expectedAlerts))
t.Fatalf("Unexpected number of alerts: %d", len(expectedAlerts))
}
}()