chore: use latest gofmt

This commit is contained in:
Christian Muehlhaeuser 2022-09-26 08:10:16 +02:00
parent bd074d2dbc
commit 4ae575a4c5
4 changed files with 32 additions and 35 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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