From 681aa90995c744fc794398219c05125981f61436 Mon Sep 17 00:00:00 2001 From: bom_d_van Date: Thu, 16 Apr 2015 17:36:55 +0800 Subject: [PATCH] simplify clone --- search.go | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/search.go b/search.go index 502c226f..a180fb92 100644 --- a/search.go +++ b/search.go @@ -24,25 +24,8 @@ type search struct { } func (s *search) clone() *search { - return &search{ - preload: s.preload, - whereConditions: s.whereConditions, - orConditions: s.orConditions, - notConditions: s.notConditions, - havingCondition: s.havingCondition, - initAttrs: s.initAttrs, - assignAttrs: s.assignAttrs, - selects: s.selects, - omits: s.omits, - orders: s.orders, - joins: s.joins, - offset: s.offset, - limit: s.limit, - group: s.group, - tableName: s.tableName, - raw: s.raw, - Unscoped: s.Unscoped, - } + clone := *s + return &clone } func (s *search) Where(query interface{}, values ...interface{}) *search {