From cbbebb3264cb15b98b4c492ca4dfcdf8f80aad66 Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 18 Mar 2020 23:21:01 -0400 Subject: [PATCH] fix: version position under banner --- consts/banner.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/consts/banner.go b/consts/banner.go index 00a6b73b4..81a9db68b 100644 --- a/consts/banner.go +++ b/consts/banner.go @@ -3,17 +3,18 @@ package consts import ( "fmt" "strings" + "unicode" "github.com/deluan/navidrome/static" ) func getBanner() string { data, _ := static.Asset("banner.txt") - return strings.TrimSuffix(string(data), "\n") + return strings.TrimRightFunc(string(data), unicode.IsSpace) } func Banner() string { version := "Version: " + Version() padding := strings.Repeat(" ", 52-len(version)) - return fmt.Sprintf("%s%s%s\n", getBanner(), padding, version) + return fmt.Sprintf("%s\n%s%s\n", getBanner(), padding, version) }