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) }