all repos — telegram-bot-api @ 6b0d3ce2a6c20b250f87f53da2ff0b261320f144

Golang bindings for the Telegram Bot API

Fix some lints.
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 14:20:12 -0500
commit

6b0d3ce2a6c20b250f87f53da2ff0b261320f144

parent

458a89724a5892eb5c41f7f1940c12072c617587

4 files changed, 8 insertions(+), 8 deletions(-)

jump to
M helpers.gohelpers.go

@@ -773,9 +773,9 @@ }

// NewOneTimeReplyKeyboard creates a new one time keyboard. func NewOneTimeReplyKeyboard(rows ...[]KeyboardButton) ReplyKeyboardMarkup { - markup := NewReplyKeyboard(rows...) - markup.OneTimeKeyboard = true - return markup + markup := NewReplyKeyboard(rows...) + markup.OneTimeKeyboard = true + return markup } // NewInlineKeyboardButtonData creates an inline keyboard button with text
M helpers_test.gohelpers_test.go

@@ -159,8 +159,8 @@

func TestNewEditMessageReplyMarkup(t *testing.T) { markup := InlineKeyboardMarkup{ InlineKeyboard: [][]InlineKeyboardButton{ - []InlineKeyboardButton{ - InlineKeyboardButton{Text: "test"}, + { + {Text: "test"}, }, }, }
M types.gotypes.go

@@ -311,8 +311,8 @@ func (e MessageEntity) IsCommand() bool {

return e.Type == "bot_command" } -// IsUrl returns true if the type of the message entity is "url". -func (e MessageEntity) IsUrl() bool { +// IsURL returns true if the type of the message entity is "url". +func (e MessageEntity) IsURL() bool { return e.Type == "url" }
M types_test.gotypes_test.go

@@ -216,7 +216,7 @@

func TestMessageEntityIsUrl(t *testing.T) { entity := MessageEntity{Type: "url"} - if !entity.IsUrl() { + if !entity.IsURL() { t.Fail() } }