From fd8435736f967233adc14af9667faf591892979e Mon Sep 17 00:00:00 2001 From: Dodi Date: Fri, 14 May 2021 18:41:43 +0700 Subject: [PATCH] bug return reflect value --- utils/slice.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/slice.go b/utils/slice.go index 98cfa6d..d972642 100644 --- a/utils/slice.go +++ b/utils/slice.go @@ -238,7 +238,7 @@ func (s slice) First(collections interface{}) (col interface{}) { } if el.Len() > 0 { - return el.Index(0) + return el.Index(0).Interface() } } return @@ -261,7 +261,7 @@ func (s slice) Last(collections interface{}) (col interface{}) { } if el.Len() > 0 { - return el.Index(el.Len()-1) + return el.Index(el.Len()-1).Interface() } } return @@ -285,7 +285,7 @@ func (s slice) FirstWhere(collections interface{}, fn func(int) bool) (col inter for i:=0; i