navidrome/resources/banner.go

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

19 lines
348 B
Go
Raw Normal View History

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