From 795b0867856ef6482d933c6064998e72cd7971e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=92=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=D0=B3=D0=BE=D0=B2?= Date: Tue, 27 Sep 2022 10:57:03 +0300 Subject: [PATCH] review --- CHANGELOG.md | 4 ++-- chat.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 544e2c9..67118c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG -## [v0.0.1] - 2022-09-20 +## [v0.1.1] - 2022-09-20 -- Add semver version `v0.0.1` (see semver.org) +- Add semver version `v0.1.1` (see semver.org) - Add `NewWithOptions(url string, opts ...Option)` for custom client settings - Rollback `go.mod` package name to `github.com/badkaktus/gorocket` \ No newline at end of file diff --git a/chat.go b/chat.go index fca1d97..fc655db 100644 --- a/chat.go +++ b/chat.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net/http" + "strconv" "time" ) @@ -247,10 +248,10 @@ func (c *Client) GetPinnedMessages(param *GetPinnedMsgRequest) (*GetPinnedMsgRes url.Add("roomId", param.RoomId) } if param.Offset != 0 { - url.Add("offset", fmt.Sprintf("%d", param.Offset)) + url.Add("offset", strconv.Itoa(param.Offset)) } if param.Count != 0 { - url.Add("count", fmt.Sprintf("%d", param.Count)) + url.Add("count", strconv.Itoa(param.Count)) } req.URL.RawQuery = url.Encode()