diff --git a/align.go b/align.go index 6c0fb2dc..0ac2f387 100644 --- a/align.go +++ b/align.go @@ -69,7 +69,7 @@ func alignTextVertical(str string, pos Position, height int, _ *termenv.Style) s case Top: return str + strings.Repeat("\n", height-strHeight) case Center: - var topPadding, bottomPadding = (height - strHeight) / 2, (height - strHeight) / 2 + topPadding, bottomPadding := (height-strHeight)/2, (height-strHeight)/2 if strHeight+topPadding+bottomPadding > height { topPadding-- } else if strHeight+topPadding+bottomPadding < height { diff --git a/borders.go b/borders.go index f244b53a..d84bfec4 100644 --- a/borders.go +++ b/borders.go @@ -411,7 +411,7 @@ func (s Style) styleBorder(border string, fg, bg TerminalColor) string { return border } - var style = termenv.Style{} + style := termenv.Style{} if fg != noColor { style = style.Foreground(fg.color(s.r))