replace += with ++

This commit is contained in:
bartfokker
2018-10-25 22:17:53 +02:00
parent 4d247f5272
commit 93556a1754

View File

@@ -4,6 +4,7 @@ package compact
import ( import (
"fmt" "fmt"
ui "github.com/gizak/termui" ui "github.com/gizak/termui"
) )
@@ -28,7 +29,7 @@ func calcWidth(width int) int {
for _, w := range colWidths { for _, w := range colWidths {
width -= w width -= w
if w == 0 { if w == 0 {
staticCols += 1 staticCols++
} }
} }
return (width - spacing) / staticCols return (width - spacing) / staticCols