Fix some lints.
parent
458a89724a
commit
6b0d3ce2a6
|
@ -773,9 +773,9 @@ func NewReplyKeyboard(rows ...[]KeyboardButton) ReplyKeyboardMarkup {
|
|||
|
||||
// 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
|
||||
|
|
|
@ -159,8 +159,8 @@ func TestNewEditMessageCaption(t *testing.T) {
|
|||
func TestNewEditMessageReplyMarkup(t *testing.T) {
|
||||
markup := InlineKeyboardMarkup{
|
||||
InlineKeyboard: [][]InlineKeyboardButton{
|
||||
[]InlineKeyboardButton{
|
||||
InlineKeyboardButton{Text: "test"},
|
||||
{
|
||||
{Text: "test"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
4
types.go
4
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"
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ func TestMessageEntityIsBotCommand(t *testing.T) {
|
|||
func TestMessageEntityIsUrl(t *testing.T) {
|
||||
entity := MessageEntity{Type: "url"}
|
||||
|
||||
if !entity.IsUrl() {
|
||||
if !entity.IsURL() {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue