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

22 lines
335 B
Go
Raw Normal View History

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