ifms_go/cmd/version.go

20 lines
321 B
Go
Raw Normal View History

2025-06-10 17:50:46 +08:00
package cmd
import (
"fmt"
"github.com/urfave/cli/v2"
)
// This function creates a CLI command that prints the version number.
func VersionCmd(v string) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "Show version",
Action: func(_ *cli.Context) error {
fmt.Println(v)
return nil
},
}
}