From 8c20ef4f7f188c723c005aec26ee0cf1b63afa27 Mon Sep 17 00:00:00 2001 From: Sanskarzz Date: Wed, 13 Mar 2024 11:19:28 +0530 Subject: [PATCH] fix: fixed go linter issues Signed-off-by: Sanskarzz --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 4e6a9e3d..5be47c33 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,10 @@ import ( func startHTTPserver() { http.HandleFunc("/", handler) - http.ListenAndServe(":8080", nil) + err := http.ListenAndServe(":8080", nil) + if err != nil { + log.Fatal("ListenAndServe: ", err) + } fmt.Println("Starting HTTP server on Port 8080") } @@ -28,7 +31,9 @@ func startGRPCServer() { } grpcServer := grpc.NewServer() fmt.Println("Starting GRPC server on Port 9090") - grpcServer.Serve(lis) + if err := grpcServer.Serve(lis); err != nil { + log.Fatalf("failed to serve: %v", err) + } }