From e86aad1be300f8d5136fc02fb02a6ff832d981aa Mon Sep 17 00:00:00 2001 From: Shimon <45685994+wan2310@users.noreply.github.com> Date: Thu, 11 Jul 2019 18:00:18 +0800 Subject: [PATCH] Update g_model.go --- generate/g_model.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generate/g_model.go b/generate/g_model.go index 44fdcc7..178e924 100644 --- a/generate/g_model.go +++ b/generate/g_model.go @@ -224,11 +224,11 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri } } - m := make(map[string]interface{}) + result := make(map[string]interface{}) if i, ex := qs.Count(); ex != nil { return nil, errors.New("Error: get total record failed") } else { - m["TotalRecord"] = i + result["TotalRecord"] = i } var l []{{modelName}} @@ -250,8 +250,8 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri list = append(list, m) } } - m["List"] = list - return m, nil + result["List"] = list + return result, nil }else { return nil, err }