Use more idiomatic function name for content setter in pager

This commit is contained in:
Christian Rocha 2020-05-15 14:14:17 -04:00
parent 149579d584
commit 7562f29046
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ func (m Model) ScrollPercent() float64 {
}
// Content set the pager's text content
func (m *Model) Content(s string) {
func (m *Model) SetContent(s string) {
s = strings.Replace(s, "\r\n", "\n", -1) // normalize line endings
m.lines = strings.Split(s, "\n")
}