Comment logs used to debug creation
This commit is contained in:
parent
b8fa3d2594
commit
169937bebd
@ -2,7 +2,6 @@ package helpers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-telegram/bot/models"
|
||||
)
|
||||
@ -34,7 +33,7 @@ func AddButton(ik *InlineKeyboard, text, data string) {
|
||||
if len(r.Buttons) < r.Len {
|
||||
button := Button{Text: text, Data: data}
|
||||
r.Buttons = append(r.Buttons, button)
|
||||
fmt.Println("ADD BUTTON ", r, ik)
|
||||
// fmt.Println("ADD BUTTON ", r, ik)
|
||||
}else {
|
||||
r = &Row{
|
||||
Len: r.Len,
|
||||
@ -42,7 +41,7 @@ func AddButton(ik *InlineKeyboard, text, data string) {
|
||||
}
|
||||
button := Button{Text: text, Data: data}
|
||||
r.Buttons = append(r.Buttons, button)
|
||||
fmt.Println("ADD BUTTON ", r, ik)
|
||||
// fmt.Println("ADD BUTTON ", r, ik)
|
||||
|
||||
ik.Rows = append(ik.Rows, *r)
|
||||
|
||||
@ -54,15 +53,15 @@ func AddButton(ik *InlineKeyboard, text, data string) {
|
||||
func AddRow(ik *InlineKeyboard, len int){
|
||||
row := &Row{Len: len, Buttons: []Button{}}
|
||||
ik.Rows = append(ik.Rows, *row)
|
||||
fmt.Println("ADD Row ", row.Len)
|
||||
// fmt.Println("ADD Row ", row.Len)
|
||||
}
|
||||
|
||||
// CreateKeyBoard
|
||||
// render the structure into a models.InlineKeyboardMarkup
|
||||
func (ik *InlineKeyboard) CreateKeyBoard()models.InlineKeyboardMarkup{
|
||||
kbd := models.InlineKeyboardMarkup{}
|
||||
fmt.Println("creating keyboard ---- ", fmt.Sprintf("%#v", ik))
|
||||
fmt.Println("row 0 ", ik.Rows[0])
|
||||
// fmt.Println("creating keyboard ---- ", fmt.Sprintf("%#v", ik))
|
||||
// fmt.Println("row 0 ", ik.Rows[0])
|
||||
for _, row := range ik.Rows {
|
||||
r := []models.InlineKeyboardButton{}
|
||||
for _, button := range row.Buttons{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user