mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 22:32:59 +03:00
chore: use latest gofmt
This commit is contained in:
parent
bd074d2dbc
commit
4ae575a4c5
@ -68,7 +68,6 @@ func (m Model) ItemsOnPage(totalItems int) int {
|
|||||||
// bunchOfStuff := []stuff{...}
|
// bunchOfStuff := []stuff{...}
|
||||||
// start, end := model.GetSliceBounds(len(bunchOfStuff))
|
// start, end := model.GetSliceBounds(len(bunchOfStuff))
|
||||||
// sliceToRender := bunchOfStuff[start:end]
|
// sliceToRender := bunchOfStuff[start:end]
|
||||||
//
|
|
||||||
func (m *Model) GetSliceBounds(length int) (start int, end int) {
|
func (m *Model) GetSliceBounds(length int) (start int, end int) {
|
||||||
start = m.Page * m.PerPage
|
start = m.Page * m.PerPage
|
||||||
end = min(m.Page*m.PerPage+m.PerPage, length)
|
end = min(m.Page*m.PerPage+m.PerPage, length)
|
||||||
|
@ -110,7 +110,6 @@ func (m *Model) SetStyles(s Styles) {
|
|||||||
// Option is used to set options in New. For example:
|
// Option is used to set options in New. For example:
|
||||||
//
|
//
|
||||||
// table := New(WithColumns([]Column{{Title: "ID", Width: 10}}))
|
// table := New(WithColumns([]Column{{Title: "ID", Width: 10}}))
|
||||||
//
|
|
||||||
type Option func(*Model)
|
type Option func(*Model)
|
||||||
|
|
||||||
// New creates a new model for the table widget.
|
// New creates a new model for the table widget.
|
||||||
|
@ -242,7 +242,6 @@ func Sync(m Model) tea.Cmd {
|
|||||||
//
|
//
|
||||||
// lines := model.ViewDown(1)
|
// lines := model.ViewDown(1)
|
||||||
// cmd := ViewDown(m, lines)
|
// cmd := ViewDown(m, lines)
|
||||||
//
|
|
||||||
func ViewDown(m Model, lines []string) tea.Cmd {
|
func ViewDown(m Model, lines []string) tea.Cmd {
|
||||||
if len(lines) == 0 {
|
if len(lines) == 0 {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user