|
|
|
@ -114,16 +114,14 @@ func runRest(_ *cobra.Command, _ []string) { |
|
|
|
|
|
|
|
// Set auto reconnect to whatsapp server after booting
|
|
|
|
go helpers.SetAutoConnectAfterBooting() |
|
|
|
err = app.Listen(":" + config.AppPort) |
|
|
|
if err != nil { |
|
|
|
if err = app.Listen(":" + config.AppPort); err != nil { |
|
|
|
log.Fatalln("Failed to start: ", err.Error()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Execute adds all child commands to the root command and sets flags appropriately.
|
|
|
|
func Execute() { |
|
|
|
err := rootCmd.Execute() |
|
|
|
if err != nil { |
|
|
|
if err := rootCmd.Execute(); err != nil { |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|
} |