Browse Source

feat: simply code

pull/33/head
Aldino Kemal 3 years ago
parent
commit
7f8ab6fc8c
  1. 6
      src/cmd/root.go

6
src/cmd/root.go

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