forked from ebhomengo/niki
optimize slice allocation in GetAllBenefactor
This commit is contained in:
parent
b9db2926c1
commit
9c8f005a50
|
|
@ -23,7 +23,7 @@ func (s Service) GetAllBenefactor(ctx context.Context, req param.BenefactorGetAl
|
|||
return param.BenefactorGetAllResponse{}, richerror.New(op).WithErr(err).WithKind(richerror.KindUnexpected)
|
||||
}
|
||||
|
||||
resp := make([]param.Data, 0)
|
||||
resp := make([]param.Data, len(benefactors))
|
||||
for _, benefactor := range benefactors {
|
||||
resp = append(resp, param.Data{
|
||||
ID: benefactor.ID,
|
||||
|
|
|
|||
Loading…
Reference in New Issue