Fix godocs for various types and functions

This commit is contained in:
Christian Muehlhaeuser
2021-03-12 02:00:03 +01:00
parent 046b9ca129
commit a0d7cb77a1
2 changed files with 5 additions and 6 deletions

View File

@@ -12,8 +12,7 @@ const (
mouseWheelDelta = 3
)
// MODEL
// Model is the Bubble Tea model for this viewport element.
type Model struct {
Width int
Height int
@@ -55,7 +54,7 @@ func (m Model) PastBottom() bool {
return m.YOffset > len(m.lines)-1-m.Height
}
// Scrollpercent returns the amount scrolled as a float between 0 and 1.
// ScrollPercent returns the amount scrolled as a float between 0 and 1.
func (m Model) ScrollPercent() float64 {
if m.Height >= len(m.lines) {
return 1.0
@@ -218,7 +217,7 @@ func (m *Model) GotoTop() (lines []string) {
return lines
}
// GotoTop sets the viewport to the bottom position.
// GotoBottom sets the viewport to the bottom position.
func (m *Model) GotoBottom() (lines []string) {
m.YOffset = max(len(m.lines)-1-m.Height, 0)