Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
More improvement implementation for collections differ.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanguranda committed Nov 21, 2017
1 parent 830c014 commit 9d03314
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions differ/collectionsDiffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ func (dcd *defaultCollectionsDiffer) Diff(incomingCollectionUuids []string, oldC
}

func oneWayDiff(firstCollection []string, secondCollection []string, markDeleted bool, mapToAdd map[string]bool) {
secondCollectionTemp := make(map[string]interface{})
secondCollectionTemp := make(map[string]struct{})
var exists = struct{}{}
for _, secondColUuid := range secondCollection {
secondCollectionTemp[secondColUuid] = nil
secondCollectionTemp[secondColUuid] = exists
}

for _, firstColUuid := range firstCollection {
Expand Down

0 comments on commit 9d03314

Please sign in to comment.