diff --git a/functions/diff.go b/functions/diff.go index 240c201..d869e71 100644 --- a/functions/diff.go +++ b/functions/diff.go @@ -23,6 +23,7 @@ func (ss SliceType) Diff(against SliceType) (added, removed SliceType) { if s.Equals(element) { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/pie/carpointers_pie.go b/pie/carpointers_pie.go index f5c97ce..1a3ae88 100755 --- a/pie/carpointers_pie.go +++ b/pie/carpointers_pie.go @@ -103,6 +103,7 @@ func (ss carPointers) Diff(against carPointers) (added, removed carPointers) { if s.Equals(element) { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/pie/cars_pie.go b/pie/cars_pie.go index 22f942d..4ea1869 100755 --- a/pie/cars_pie.go +++ b/pie/cars_pie.go @@ -103,6 +103,7 @@ func (ss cars) Diff(against cars) (added, removed cars) { if s == element { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/pie/float64s_pie.go b/pie/float64s_pie.go index b27eac2..f4ed37a 100755 --- a/pie/float64s_pie.go +++ b/pie/float64s_pie.go @@ -142,6 +142,7 @@ func (ss Float64s) Diff(against Float64s) (added, removed Float64s) { if s == element { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/pie/ints_pie.go b/pie/ints_pie.go index 13c8238..54db591 100755 --- a/pie/ints_pie.go +++ b/pie/ints_pie.go @@ -142,6 +142,7 @@ func (ss Ints) Diff(against Ints) (added, removed Ints) { if s == element { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/pie/strings_pie.go b/pie/strings_pie.go index f55df35..42e9bbd 100755 --- a/pie/strings_pie.go +++ b/pie/strings_pie.go @@ -117,6 +117,7 @@ func (ss Strings) Diff(against Strings) (added, removed Strings) { if s == element { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } } diff --git a/template.go b/template.go index d7f88f5..8bf24ed 100644 --- a/template.go +++ b/template.go @@ -156,6 +156,7 @@ func (ss SliceType) Diff(against SliceType) (added, removed SliceType) { if s.Equals(element) { ss2 = append(ss2[:i], ss2[i+1:]...) found = true + break } }