sub2sing-box/cmd/version.go

21 lines
309 B
Go
Raw Normal View History

2024-03-13 00:11:34 +08:00
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version",
Long: "Print version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("version: " + RootCmd.Version)
},
}
func init() {
RootCmd.AddCommand(versionCmd)
}