mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-05 05:27:37 +03:00
fix: version position under banner
This commit is contained in:
parent
8b108905a3
commit
cbbebb3264
1 changed files with 3 additions and 2 deletions
|
@ -3,17 +3,18 @@ package consts
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
"unicode"
|
||||||
|
|
||||||
"github.com/deluan/navidrome/static"
|
"github.com/deluan/navidrome/static"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getBanner() string {
|
func getBanner() string {
|
||||||
data, _ := static.Asset("banner.txt")
|
data, _ := static.Asset("banner.txt")
|
||||||
return strings.TrimSuffix(string(data), "\n")
|
return strings.TrimRightFunc(string(data), unicode.IsSpace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Banner() string {
|
func Banner() string {
|
||||||
version := "Version: " + Version()
|
version := "Version: " + Version()
|
||||||
padding := strings.Repeat(" ", 52-len(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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue