1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-29 16:51:29 +00:00

fix the comment of SliceIntersect

The implementations of SliceDiff and SliceIntersect are the same.
However, the comments of them are opposite.
The former is (slice1 - slice2) while the latter is (slice2- slice1)
This commit is contained in:
Stan Sun 2014-08-02 17:54:57 +08:00
parent 0836b9e13f
commit 22ba252c8f

View File

@ -101,7 +101,7 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) {
return return
} }
// SliceIntersect returns diff slice of slice2 - slice1. // SliceIntersect returns diff slice of slice1 - slice2.
func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) { func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) {
for _, v := range slice1 { for _, v := range slice1 {
if !InSliceIface(v, slice2) { if !InSliceIface(v, slice2) {