diff --git a/action_query.go b/action_query.go index 7a86196..b3f51d0 100644 --- a/action_query.go +++ b/action_query.go @@ -26,12 +26,14 @@ type AllQuery struct { } // All ... -func (s Service) All(query AllQuery) (result []Audit, total int64) { +func (s Service) All(query AllQuery) ([]Audit, int64) { var ( ctx = context.Background() colName = getColName(query.Target) skip = query.Page * query.Limit wg sync.WaitGroup + result = make([]Audit, 0) + total int64 ) cond := s.getQueryCondition(query) wg.Add(1)