navidrome/resources/banner.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
348 B
Go
Raw Normal View History

package resources
2020-01-25 17:06:04 +01:00
import (
"fmt"
"strings"
2020-03-19 04:21:01 +01:00
"unicode"
2020-01-25 17:06:04 +01:00
"github.com/navidrome/navidrome/consts"
2020-01-25 17:06:04 +01:00
)
2021-07-21 00:43:15 +02:00
func loadBanner() string {
data, _ := Asset("banner.txt")
2020-03-19 04:21:01 +01:00
return strings.TrimRightFunc(string(data), unicode.IsSpace)
2020-01-25 17:06:04 +01:00
}
func Banner() string {
2022-09-15 03:09:39 +02:00
version := "Version: " + consts.Version
2021-07-21 00:43:15 +02:00
return fmt.Sprintf("%s\n%52s\n", loadBanner(), version)
2020-01-25 17:06:04 +01:00
}