Skip to content

Commit

Permalink
feat: add version command to print out the current version of yurl
Browse files Browse the repository at this point in the history
  • Loading branch information
gurleensethi committed Apr 2, 2023
1 parent a79ace0 commit c99142d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
)

var (
Version = "v0.3.0"

DefaultHTTPYamlFile = "http.yaml"

UsageText = `
Expand Down Expand Up @@ -90,6 +92,14 @@ func (a *app) BuildCliApp() *cli.App {
},
},
Commands: []*cli.Command{
{
Name: "version",
Usage: "print the version of yurl",
Action: func(c *cli.Context) error {
fmt.Println(Version)
return nil
},
},
{
Name: "list-requests",
Aliases: []string{"ls"},
Expand Down

0 comments on commit c99142d

Please sign in to comment.