quintodrome/consts/banner.go

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

20 lines
353 B
Go
Raw Normal View History

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