From c4db0d2d7cef2b54839e410f0a0c8396b5f4249a Mon Sep 17 00:00:00 2001 From: Tue Date: Tue, 18 Oct 2022 17:18:11 +0700 Subject: [PATCH] fix audit --- action_query.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)