Skip to content

Commit

Permalink
Display banner.txt on CLI command (#73)
Browse files Browse the repository at this point in the history
Closes #50.
  • Loading branch information
gmso authored Jan 9, 2023
1 parent e6a0242 commit 7b9ec07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func main() {
log.Fatalf("Pushup requires Go to be installed.")
}

printBanner()

if flag.NArg() == 0 {
printPushupHelp()
os.Exit(1)
Expand Down Expand Up @@ -514,6 +516,14 @@ func printPushupHelp() {
w.Flush()
}

//go:embed banner.txt
var bannerFile embed.FS
var banner, _ = bannerFile.ReadFile("banner.txt")

func printBanner() {
fmt.Fprintf(os.Stdout, "\n%s\n", banner)
}

type pushupContext struct {
*cancellationSource
fileChangeCtx context.Context
Expand Down

0 comments on commit 7b9ec07

Please sign in to comment.