From f7ac04ea6abfb134f55b7dd7c04d79a3deb07b2a Mon Sep 17 00:00:00 2001 From: Thomas Bennett Date: Sun, 15 May 2016 11:47:50 -0700 Subject: [PATCH] fixed string conversion to Itoa --- halo/stats.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/halo/stats.go b/halo/stats.go index 9c50d04..1e05647 100644 --- a/halo/stats.go +++ b/halo/stats.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "net/url" + "strconv" ) func (h *Halo) EventsForMatch(matchid string) (EventsForMatchStruct, error) { @@ -41,10 +42,10 @@ func (h *Halo) MatchesForPlayer(player, modes string, start, count int) (Matches q.Set("modes", modes) } if start != 0 { - q.Set("start", string(start)) + q.Set("start", strconv.Itoa(start)) } if count != 0 { - q.Set("count", string(count)) + q.Set("count", strconv.Itoa(count)) } url.RawQuery = q.Encode() jsonObject, err := h.sendRequest(url.String()) @@ -72,7 +73,7 @@ func (h *Halo) PlayerLeaderboard(seasonid, playlistid string, count int) (Player q := url.Query() if count != 0 { - q.Set("count", string(count)) + q.Set("count", strconv.Itoa(count)) } url.RawQuery = q.Encode() jsonObject, err := h.sendRequest(url.String())