From 22ba252c8f5778509868136f463bc27cbe5a8906 Mon Sep 17 00:00:00 2001 From: Stan Sun Date: Sat, 2 Aug 2014 17:54:57 +0800 Subject: [PATCH] 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) --- utils/slice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/slice.go b/utils/slice.go index 6092e79a..323c02fd 100644 --- a/utils/slice.go +++ b/utils/slice.go @@ -101,7 +101,7 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) { return } -// SliceIntersect returns diff slice of slice2 - slice1. +// SliceIntersect returns diff slice of slice1 - slice2. func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) { for _, v := range slice1 { if !InSliceIface(v, slice2) {