]> git.giacomolli.uk - onechat/blobdiff - view_layout.go
Rewrite the README as a user guide
[onechat] / view_layout.go
index 0d4e7560581a5d554932bf46280f344aa5b0d75b..3db2f017ed8b46e120c24605e25b9ea99e07099b 100644 (file)
@@ -59,8 +59,11 @@ type ViewLayout struct {
 // earlier messages up to the first one whose text differs, and puts the rest
 // of the lines into one new message.
 func (l *ViewLayout) Split(lines []string) ([]string, error) {
 // earlier messages up to the first one whose text differs, and puts the rest
 // of the lines into one new message.
 func (l *ViewLayout) Split(lines []string) ([]string, error) {
-       var texts []string
-       var kept []ViewLayoutMessage
+       var (
+               texts []string
+               kept  []ViewLayoutMessage
+       )
+
        start := 0
        for _, message := range l.Messages {
                if start+message.Lines > len(lines) {
        start := 0
        for _, message := range l.Messages {
                if start+message.Lines > len(lines) {