From a38527daddbc6e04b33e35cf3b5dce9d9dca6866 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Fri, 13 Jun 2025 00:46:43 +0300 Subject: [PATCH] fix --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0370907..877eca6 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,11 @@ func handlerWrapper(f func(*http.Request) (interface{}, int)) func(http.Response } func main() { - client.Connect() + err := client.Connect() + if err != nil { + panic(err) + } + http.HandleFunc("/api/v1/metrics/endpoint", handlerWrapper(endpoint.AddEndpointMetric)) log.Printf("Server started") http.ListenAndServe(":1237", nil)