✨ 新增 --version
This commit is contained in:
parent
3c95e509a0
commit
b14e3fe4c4
7
main.go
7
main.go
|
@ -8,10 +8,13 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
const version = "v0.0.1-snapshot" // 版本号
|
||||
|
||||
func main() {
|
||||
app := &cli.App{
|
||||
Name: "boom",
|
||||
Usage: "make an explosive entrance",
|
||||
Name: "boom",
|
||||
Version: version,
|
||||
Usage: "make an explosive entrance",
|
||||
Action: func(*cli.Context) error {
|
||||
fmt.Println("boom! I say!")
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue