From acf35e9151144a19d7380997aa7964e49506e8fb Mon Sep 17 00:00:00 2001 From: chenzhiming Date: Wed, 20 Jul 2016 20:49:09 +0800 Subject: [PATCH] fix bug of newer error --- g_appcode.go | 2 +- g_hproseappcode.go | 2 +- g_model.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/g_appcode.go b/g_appcode.go index 7860912..47b518d 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -1099,7 +1099,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} qs = qs.OrderBy(sortFields...) - if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { + if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil { if len(fields) == 0 { for _, v := range l { ml = append(ml, v) diff --git a/g_hproseappcode.go b/g_hproseappcode.go index 86e3d02..b2a5a8f 100644 --- a/g_hproseappcode.go +++ b/g_hproseappcode.go @@ -260,7 +260,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} qs = qs.OrderBy(sortFields...) - if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { + if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil { if len(fields) == 0 { for _, v := range l { ml = append(ml, v) diff --git a/g_model.go b/g_model.go index 859164f..6b0979e 100644 --- a/g_model.go +++ b/g_model.go @@ -202,7 +202,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri var l []{{modelName}} qs = qs.OrderBy(sortFields...) - if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { + if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil { if len(fields) == 0 { for _, v := range l { ml = append(ml, v)