Skip to content

Commit

Permalink
docs: fix Split examples
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Feb 7, 2022
1 parent 043315d commit 6c51ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c51ff7

Please sign in to comment.