Skip to content

Commit

Permalink
Add new command-line arg -unicode-box
Browse files Browse the repository at this point in the history
  • Loading branch information
tmck-code committed Sep 27, 2023
1 parent a5e59ef commit 1848d68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pokesay.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func parseFlags() pokesay.Args {
listCategories := flag.Bool("list-categories", false, "list all available categories")
listNames := flag.Bool("list-names", false, "list all available names")
japaneseName := flag.Bool("japanese-name", false, "print the japanese name")
unicodeBox := flg.Bool("unicode-box", false, "use unicode characters to draw the speech box")

flag.Parse()
var args pokesay.Args
Expand All @@ -66,6 +67,7 @@ func parseFlags() pokesay.Args {
Category: *category,
NameToken: *name,
JapaneseName: *japaneseName,
UnicodeBox: *unicodeBox,
}
}
return args
Expand Down
2 changes: 2 additions & 0 deletions src/pokesay/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ type Args struct {
Category string
NameToken string
JapaneseName bool
Unicode bool
}


// The main print function! This uses a chosen pokemon's index, names and categories, and an
// embedded filesystem of cowfile data
// 1. The text received from STDIN is printed inside a speech bubble
Expand Down

0 comments on commit 1848d68

Please sign in to comment.