Skip to content

Commit

Permalink
Add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhobbs committed Jul 10, 2024
1 parent 9e8a3a5 commit 04b05b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions commands/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package commands

import (
"context"
"fmt"

"github.com/peterbourgon/ff/v3/ffcli"
)

var Version *ffcli.Command = &ffcli.Command{
Name: "version",
ShortUsage: "authy-cli version",
ShortHelp: "Print authy-cli version",
Exec: func(_ context.Context, args []string) error {
fmt.Println("authy-cli version 0.1.0")
return nil
},
}
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
commands.Token(db),
commands.List(db),
commands.Unlock(db),
commands.Version,
},
Exec: func(context.Context, []string) error {
return flag.ErrHelp
Expand Down

0 comments on commit 04b05b1

Please sign in to comment.