@@ -421,8 +421,8 @@ func NewEditMessageCaption(chatID int64, messageID int, caption string) EditMess
421
421
func NewEditMessageReplyMarkup (chatID int64 , messageID int , replyMarkup InlineKeyboardMarkup ) EditMessageReplyMarkupConfig {
422
422
return EditMessageReplyMarkupConfig {
423
423
BaseEdit : BaseEdit {
424
- ChatID : chatID ,
425
- MessageID : messageID ,
424
+ ChatID : chatID ,
425
+ MessageID : messageID ,
426
426
ReplyMarkup : & replyMarkup ,
427
427
},
428
428
}
@@ -466,9 +466,7 @@ func NewKeyboardButtonLocation(text string) KeyboardButton {
466
466
func NewKeyboardButtonRow (buttons ... KeyboardButton ) []KeyboardButton {
467
467
var row []KeyboardButton
468
468
469
- for _ , button := range buttons {
470
- row = append (row , button )
471
- }
469
+ row = append (row , buttons ... )
472
470
473
471
return row
474
472
}
@@ -477,9 +475,7 @@ func NewKeyboardButtonRow(buttons ...KeyboardButton) []KeyboardButton {
477
475
func NewReplyKeyboard (rows ... []KeyboardButton ) ReplyKeyboardMarkup {
478
476
var keyboard [][]KeyboardButton
479
477
480
- for _ , row := range rows {
481
- keyboard = append (keyboard , row )
482
- }
478
+ keyboard = append (keyboard , rows ... )
483
479
484
480
return ReplyKeyboardMarkup {
485
481
ResizeKeyboard : true ,
@@ -518,9 +514,7 @@ func NewInlineKeyboardButtonSwitch(text, sw string) InlineKeyboardButton {
518
514
func NewInlineKeyboardRow (buttons ... InlineKeyboardButton ) []InlineKeyboardButton {
519
515
var row []InlineKeyboardButton
520
516
521
- for _ , button := range buttons {
522
- row = append (row , button )
523
- }
517
+ row = append (row , buttons ... )
524
518
525
519
return row
526
520
}
@@ -529,9 +523,7 @@ func NewInlineKeyboardRow(buttons ...InlineKeyboardButton) []InlineKeyboardButto
529
523
func NewInlineKeyboardMarkup (rows ... []InlineKeyboardButton ) InlineKeyboardMarkup {
530
524
var keyboard [][]InlineKeyboardButton
531
525
532
- for _ , row := range rows {
533
- keyboard = append (keyboard , row )
534
- }
526
+ keyboard = append (keyboard , rows ... )
535
527
536
528
return InlineKeyboardMarkup {
537
529
InlineKeyboard : keyboard ,
0 commit comments