2024-07-12 16:00:15 +08:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2024-07-14 17:26:48 +08:00
|
|
|
"github.com/fatih/color"
|
2024-07-12 16:00:15 +08:00
|
|
|
"github.com/loveuer/nf/nft/nfctl/version"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
versionCmd = &cobra.Command{
|
|
|
|
Use: "version",
|
|
|
|
Short: "print nfctl version and exit",
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2024-07-14 17:26:48 +08:00
|
|
|
color.Cyan("nfctl - version: %s", version.Version)
|
|
|
|
version.Check(true, false, 5)
|
2024-07-12 16:00:15 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|