Skip to content

Commit

Permalink
add qr code (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuven Harrison authored Dec 8, 2023
1 parent d5b73fa commit a5350b1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions internal/qr_code.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package internal

import (
"github.com/spf13/cobra"
)

func getQRCodeCmd() *cobra.Command {

cmd := cobra.Command{
Use: "qr",
Short: "Display QR code",
Long: "Display QR code",
Args: cobra.NoArgs,
ValidArgsFunction: cobra.NoFileCompletions, // see https://github.com/spf13/cobra/issues/1969
RunE: func(cmd *cobra.Command, args []string) error {

println(`
▄▄▄▄▄▄▄ ▄ ▄▄ ▄▄▄▄ ▄▄▄▄▄▄▄
█ ▄▄▄ █ ▄▄█▀█▄█▀█▀ █ █ ▄▄▄ █
█ ███ █ ▀█▀ ▀█▀ ▄██ █ ███ █
█▄▄▄▄▄█ ▄▀▄ ▄▀▄ ▄ █▀█ █▄▄▄▄▄█
▄▄▄ ▄▄▄▄█▀█▄▀▀█▄▀█▄▀▀▄▄ ▄
▀██▄▀ ▄▀█▄▀▀ ▄▀▀ ▄ █▄█ ▄▀▄▄█
█▄█ █▄██ ▀▄ ▀▄█▀▀▀▄▄▀▀▄ █▄
▀▄█▀▄▄▀ ▄██▀▄██▄ ▀▀▀█ ▄█ ▄█
█▄▀▀▄▀▄▀█▄▀▄▀▀█▄██▀▄█▀█▄ █ █▄
▄▀▄ ▄▄▄▀▀▀▀ ▄▀▀▄▀▄ █▀▄▄▀▀▄█
▄▀▄▄▄▄▄██ ▄▀▄ ██▀██████▀ ▀
▄▄▄▄▄▄▄ █▄ ██▀▄ █████ ▄ █▄▀██
█ ▄▄▄ █ █▄▄▄▀▀█ ██▀ █▄▄▄█▀ ▀▄
█ ███ █ ▄█ ▀ ▄▀ ▀▀ ▄▀ ██▄▀▀█
█▄▄▄▄▄█ █▀▄▀▄ █▄█ ███ ▄█ █▄
`)
return nil
},
}

return &cmd
}
1 change: 1 addition & 0 deletions internal/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func Run(args []string, stdout io.Writer, stderr io.Writer) int {
getChangelogCmd(),
getFlattenCmd(),
getChecksCmd(),
getQRCodeCmd(),
)

return run(rootCmd)
Expand Down

0 comments on commit a5350b1

Please sign in to comment.