From 41ac73b6a1e89e72e59b61b77815ee690af71fb8 Mon Sep 17 00:00:00 2001 From: daheige Date: Wed, 14 Jul 2021 21:56:58 +0800 Subject: [PATCH] update comment for ConvertSliceOfMapToValuesForCreate func --- callbacks/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/callbacks/helper.go b/callbacks/helper.go index ad85a1c6..d83d20ce 100644 --- a/callbacks/helper.go +++ b/callbacks/helper.go @@ -44,7 +44,7 @@ func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[st columns = make([]string, 0, len(mapValues)) ) - // when the length of mapValues,return directly here + // when the length of mapValues is zero,return directly here // no need to call stmt.SelectAndOmitColumns method if len(mapValues) == 0 { stmt.AddError(gorm.ErrEmptySlice)