mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Simplify resources
code, enabling any resource to be overridden (not just translations)
This commit is contained in:
parent
9072412812
commit
fa3471f527
6 changed files with 30 additions and 20 deletions
19
resources/banner.go
Normal file
19
resources/banner.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package resources
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/navidrome/navidrome/consts"
|
||||
)
|
||||
|
||||
func loadBanner() string {
|
||||
data, _ := Asset("banner.txt")
|
||||
return strings.TrimRightFunc(string(data), unicode.IsSpace)
|
||||
}
|
||||
|
||||
func Banner() string {
|
||||
version := "Version: " + consts.Version()
|
||||
return fmt.Sprintf("%s\n%52s\n", loadBanner(), version)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue