Skip to content

Commit

Permalink
refactor: move the logo to a txt file that we embed to the applicatio…
Browse files Browse the repository at this point in the history
…n on build
  • Loading branch information
bjarneo committed Mar 23, 2022
1 parent c848c57 commit 9956ce3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions core/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

___ ___ ___
| _ \_ _| _ \
| /| || _/
|_|_\___|_|
18 changes: 8 additions & 10 deletions core/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import (
"strings"

"github.com/pterm/pterm"

_ "embed"
)

var (
//go:embed banner.txt
logo string
)

func template(name string, value string) string {
Expand All @@ -17,16 +24,7 @@ func template(name string, value string) string {
}

func Logo() string {
logo := `
___ ___ ___
| _ \_ _| _ \
| /| || _/
|_|_\___|_|
`

return pterm.DefaultCenter.Sprint(logo)
return pterm.DefaultCenter.Sprint(string(logo))
}

func PrintStats(stats Statistics) string {
Expand Down

0 comments on commit 9956ce3

Please sign in to comment.