From e8d2b2b267a04c0fed9ec5be893e9f1c607d8beb Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:22:46 +0100 Subject: [PATCH] Remove listening on message as Gofiber has its own --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 7e9f85f..7ff4140 100644 --- a/main.go +++ b/main.go @@ -238,7 +238,7 @@ func monitorInstances() { lines := strings.Split(buf.String(), "\n") - instances := []Instance{} + var instances []Instance wg := sync.WaitGroup{} @@ -288,6 +288,8 @@ func main() { return c.JSON(monitored_instances) }) - fmt.Println("Listening on http://localhost:3000") - app.Listen(":3000") + err := app.Listen(":3000") + if err != nil { + panic(err) + } }