feat: add version command

This commit is contained in:
2021-07-20 23:59:47 +02:00
parent c9ba7aef20
commit 7b2100c568
3 changed files with 16 additions and 1 deletions

View File

@ -29,6 +29,7 @@ func RunApp(version, commit string) {
},
},
},
VersionCommand,
},
Flags: []cli.Flag{
EnvFlag,

14
cli/version.go Normal file
View File

@ -0,0 +1,14 @@
package cli
import (
"github.com/urfave/cli/v2"
)
var VersionCommand = &cli.Command{
Name: "version",
Usage: "Print the version",
Action: func(c *cli.Context) error {
cli.VersionPrinter(c)
return nil
},
}