Skip to content

Commit

Permalink
optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
qiangxue committed Sep 7, 2016
1 parent da8bff2 commit 3aafbed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (s *structValue) pk() map[string]interface{} {

// columns returns the struct field values indexed by their corresponding DB column names.
func (s *structValue) columns(include, exclude []string) map[string]interface{} {
v := map[string]interface{}{}
v := make(map[string]interface{}, len(s.nameMap))
if len(include) == 0 {
for _, fi := range s.nameMap {
v[fi.dbName] = fi.getValue(s.value)
Expand Down

0 comments on commit 3aafbed

Please sign in to comment.