1
0
mirror of https://github.com/nitezs/sub2sing-box.git synced 2024-12-24 13:34:41 -05:00
sub2sing-box/cmd/version.go
2024-03-19 23:53:08 +08:00

22 lines
335 B
Go

package cmd
import (
"fmt"
"sub2sing-box/constant"
"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: " + constant.Version)
},
}
func init() {
RootCmd.AddCommand(versionCmd)
}