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

@@ -65,10 +65,9 @@ func (m Model) ItemsOnPage(totalItems int) int {
// of the slice you're rendering and you'll receive the start and end bounds
// corresponding the to pagination. For example:
//
// bunchOfStuff := []stuff{...}
// start, end := model.GetSliceBounds(len(bunchOfStuff))
// sliceToRender := bunchOfStuff[start:end]
//
// bunchOfStuff := []stuff{...}
// start, end := model.GetSliceBounds(len(bunchOfStuff))
// sliceToRender := bunchOfStuff[start:end]
func (m *Model) GetSliceBounds(length int) (start int, end int) {
start = m.Page * m.PerPage
end = min(m.Page*m.PerPage+m.PerPage, length)