mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
Small refactorings
This commit is contained in:
parent
08840f6170
commit
7540881695
8 changed files with 13 additions and 19 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue