mp := [][]string{ {add, "AddPool"}, {lang, "Lang"}, {help, "Help"}, {admin, "Admin"}, } rows := make([][]tgbotapi.InlineKeyboardButton, 0, len(mp)) for _, value := range mp { row := tgbotapi.NewInlineKeyboardRow() row = append(row, tgbotapi.NewInlineKeyboardButtonData(value[0], value[1])) rows = append(rows, row) } keyboard := tgbotapi.NewInlineKeyboardMarkup(rows...) msg.ReplyMarkup = &keyboard mess, _ := bot.Send(msg)
Обсуждают сегодня