hpds_mq/main.go

29 lines
445 B
Go
Raw Normal View History

2022-10-23 14:03:36 +08:00
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 {
2023-03-24 08:44:08 +08:00
_, _ = fmt.Fprint(os.Stderr, err.Error())
2022-10-23 14:03:36 +08:00
os.Exit(1)
}
}