新增 --version

This commit is contained in:
徐晓伟 2023-10-01 22:43:51 +08:00
parent 3c95e509a0
commit b14e3fe4c4
1 changed files with 5 additions and 2 deletions

View File

@ -8,9 +8,12 @@ import (
"github.com/urfave/cli/v2"
)
const version = "v0.0.1-snapshot" // 版本号
func main() {
app := &cli.App{
Name: "boom",
Version: version,
Usage: "make an explosive entrance",
Action: func(*cli.Context) error {
fmt.Println("boom! I say!")