1
0
mirror of https://github.com/nitezs/sub2sing-box.git synced 2024-12-25 02:04:42 -05:00
sub2sing-box/cmd/version.go

21 lines
309 B
Go
Raw Normal View History

2024-03-12 12:11:34 -04: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)
}