// SetLikingPageMeta set likingList's page meta. func SetLikingPageMeta(likingList *model.LikingList, currentPage int, hasPrev bool, hasNext bool, count int, currentUserlikedCount int) { if len(likingList.Likings) == 0 { likingList.Likings = make([]model.User, 0) } if currentUserlikedCount == 1 { likingList.IsLiked = true } likingList.CurrentPage = currentPage likingList.HasPrev = hasPrev likingList.HasNext = hasNext likingList.Count = count }