gosocketio/cli/version.go

23 lines
401 B
Go
Raw Normal View History

2023-11-25 22:27:57 +08:00
package cli
import (
"fmt"
"github.com/spf13/cobra"
)
const version string = "v0.1"
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of gosocketio",
Long: `Print the version number of gosocketio`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Socket io server version %s \n", version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}