From b281e27df14d4aab71eaf60416261604e959e751 Mon Sep 17 00:00:00 2001 From: xsami Date: Tue, 15 Oct 2019 16:32:02 -0400 Subject: [PATCH] code refactoring. --- models/friend.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/models/friend.go b/models/friend.go index 28ff4e8..5ac027a 100644 --- a/models/friend.go +++ b/models/friend.go @@ -93,11 +93,7 @@ func ValidateFriendShip(friends []Friend, userIDA int, userIDB int) bool { (f.UserIDFrom == userIDB && f.UserIDTo == userIDA)) }) - if len(resultFriends) > 0 { - return true - } - - return false + return len(resultFriends) > 0 } // GetFriendsID return a list of IDs