From f5aa6e432dfd20f502138308bfbb178dff371e8d Mon Sep 17 00:00:00 2001 From: Jesper Handskemager Date: Fri, 16 Sep 2022 14:37:39 +0200 Subject: [PATCH] Remove legacy code --- main.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/main.go b/main.go index d8eb105..7409367 100644 --- a/main.go +++ b/main.go @@ -165,24 +165,6 @@ type userStruct struct { FriendCode string `json:"friend_code"` } -func GetFriendCode(users []string) []userStruct { - var userArr []userStruct - for _, u := range users { - resp, err := http.Get("http://localhost:8383/api/v1/user/" + u) - if err != nil { - log.Println(err) - log.Println("quiting") - return userArr - } - var userTemp userStruct - bodyBytes, _ := io.ReadAll(resp.Body) - resp.Body.Close() - json.Unmarshal(bodyBytes, &userTemp) - userArr = append(userArr, userTemp) - } - return userArr -} - func GetFriendCodes(users []string) []userStruct { var userArr []userStruct