Skip to content

Commit

Permalink
simplify clone
Browse files Browse the repository at this point in the history
  • Loading branch information
bom-d-van committed Apr 16, 2015
1 parent 5aca010 commit 681aa90
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions search.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 681aa90

Please sign in to comment.