From 97e78127adf3176b00d3aed8e19443b8edb267c3 Mon Sep 17 00:00:00 2001 From: Ulrich Schreiner Date: Sat, 30 Jun 2018 22:34:04 +0200 Subject: [PATCH] fix lint errors in current code --- bot.go | 8 ++++---- util.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.go b/bot.go index df79ea9..ade4bde 100644 --- a/bot.go +++ b/bot.go @@ -26,9 +26,9 @@ func NewBot(pref Settings) (*Bot, error) { } bot := &Bot{ - Token: pref.Token, - Updates: make(chan Update, pref.Updates), - Poller: pref.Poller, + Token: pref.Token, + Updates: make(chan Update, pref.Updates), + Poller: pref.Poller, handlers: make(map[string]interface{}), stop: make(chan struct{}), @@ -847,7 +847,7 @@ func (b *Bot) StopLiveLocation(message Editable, options ...interface{}) (*Messa params := map[string]string{ "chat_id": fmt.Sprintf("%d", chatID), - "message_id": fmt.Sprintf("%d", messageID), + "message_id": messageID, } sendOpts := extractOptions(options) diff --git a/util.go b/util.go index 2a65538..fc615b4 100644 --- a/util.go +++ b/util.go @@ -205,5 +205,5 @@ func processButtons(keys [][]InlineButton) { func embedRights(p map[string]string, prv Rights) { jsonRepr, _ := json.Marshal(prv) - json.Unmarshal(jsonRepr, p) + json.Unmarshal(jsonRepr, &p) }