Small refactorings

This commit is contained in:
Deluan 2021-07-20 18:43:15 -04:00
parent 08840f6170
commit 7540881695
8 changed files with 13 additions and 19 deletions

View file

@ -8,13 +8,12 @@ import (
"github.com/navidrome/navidrome/resources"
)
func getBanner() string {
func loadBanner() string {
data, _ := resources.Asset("banner.txt")
return strings.TrimRightFunc(string(data), unicode.IsSpace)
}
func Banner() string {
version := "Version: " + Version()
padding := strings.Repeat(" ", 52-len(version))
return fmt.Sprintf("%s\n%s%s\n", getBanner(), padding, version)
return fmt.Sprintf("%s\n%52s\n", loadBanner(), version)
}