From a182d5848f8a89bf75d7a50a69ec368813dbe76b Mon Sep 17 00:00:00 2001 From: Lakshay Manchanda Date: Sat, 3 Aug 2024 00:37:57 +0530 Subject: [PATCH] Deprecated IOUTIL removed --- call-profile/main.go | 1 - layer/utils/firestore.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/call-profile/main.go b/call-profile/main.go index 3127874..09bfe82 100644 --- a/call-profile/main.go +++ b/call-profile/main.go @@ -14,7 +14,6 @@ import ( func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { ctx := context.Background() client, err := utils.InitializeFirestoreClient(ctx) - fmt.Println(client, err) if err != nil { return events.APIGatewayProxyResponse{}, err } diff --git a/layer/utils/firestore.go b/layer/utils/firestore.go index fa5e5a8..00d31f5 100644 --- a/layer/utils/firestore.go +++ b/layer/utils/firestore.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "log" "net/http" "os" @@ -146,7 +146,7 @@ func Getdata(client *firestore.Client, ctx context.Context, userId string, userU defer resp.Body.Close() - r, err := ioutil.ReadAll(resp.Body) + r, err := io.ReadAll(resp.Body) if err != nil { LogProfileSkipped(client, ctx, userId, fmt.Sprintln(err), sessionId) SetProfileStatusBlocked(client, ctx, userId, fmt.Sprintln(err), sessionId, discordId)