Fix some lints.
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 14:20:12 -0500
4 files changed,
8 insertions(+),
8 deletions(-)
M
helpers.go
→
helpers.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.go
→
helpers_test.go
@@ -159,8 +159,8 @@
func TestNewEditMessageReplyMarkup(t *testing.T) { markup := InlineKeyboardMarkup{ InlineKeyboard: [][]InlineKeyboardButton{ - []InlineKeyboardButton{ - InlineKeyboardButton{Text: "test"}, + { + {Text: "test"}, }, }, }
M
types.go
→
types.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.go
→
types_test.go
@@ -216,7 +216,7 @@
func TestMessageEntityIsUrl(t *testing.T) { entity := MessageEntity{Type: "url"} - if !entity.IsUrl() { + if !entity.IsURL() { t.Fail() } }