From 59874c2afabe9d8b65123ef2279ce4e61c113181 Mon Sep 17 00:00:00 2001 From: Michael Lorant Date: Wed, 31 Jan 2024 09:44:00 +1100 Subject: [PATCH] chore: apply gofumpt to all files (#255) Apply gofumpt to all files to correct minor formatting issues. Signed-off-by: Michael Lorant --- align.go | 2 +- borders.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/align.go b/align.go index 6c0fb2dc..7ee549fc 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 //nolint:gomnd 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))