docs: fix Split examples

pull/497/head
Demian 2 years ago
parent 043315d184
commit 6c51ff7743

@ -197,8 +197,8 @@ func (r *ReplyMarkup) Row(many ...Btn) Row {
// For example, if you pass six buttons and 3 as the max, you get two rows with
// three buttons in each.
//
// Split(3, []Btn{six buttons...}) -> [[1, 2, 3], [4, 5, 6]]
// Split(2, []Btn{six buttons...}) -> [[1, 2],[3, 4],[5, 6]]
// `Split(3, []Btn{six buttons...}) -> [[1, 2, 3], [4, 5, 6]]`
// `Split(2, []Btn{six buttons...}) -> [[1, 2],[3, 4],[5, 6]]`
//
func (r *ReplyMarkup) Split(max int, btns []Btn) []Row {
rows := make([]Row, (max-1+len(btns))/max)

Loading…
Cancel
Save