package main import ( "fmt" "github.com/spf13/cobra" "hpds_mq/cmd" "os" ) var ( rootCmd = &cobra.Command{ Use: "hpds_mq", Long: "hpds_mq is a IoT broker that fully implements MQTT V5.0 and V3.1.1 protocol", Version: "0.1", } ) func init() { rootCmd.AddCommand(cmd.NewStartCmd()) //cmd.NewStartCmd() } func main() { if err := rootCmd.Execute(); err != nil { _, _ = fmt.Fprint(os.Stderr, err.Error()) os.Exit(1) } }