start command doc

This commit is contained in:
zhiqiang feng
2020-12-22 12:07:30 +08:00
parent 13ff3f09e8
commit f0983f0d02
+4 -8
View File
@@ -30,13 +30,9 @@ import (
// startCmd represents the start command
var startCmd = &cobra.Command{
Use: "start",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Short: "start telegram receive service",
Long: `open serial port
start a tcp server for processing`,
Run: func(cmd *cobra.Command, args []string) {
start()
},
@@ -86,7 +82,7 @@ func start() {
// above sending a value on `done`) and then exit.
fmt.Println("awaiting signal")
_ = utils.InitDb(dbFile, dbInit)
utils.Listen(socketAddress)
go utils.Listen(socketAddress)
for utils.ServerRunning {
if !utils.IsPortOpen() {
log.Println("try to open port")