summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-02-28 09:16:41 +0100
committerGitHub <noreply@github.com>2020-02-28 05:16:41 -0300
commit694f44660f51aa2e8be920c49461380b7db64755 (patch)
treec3b8ad0b6b3660c8e0a4c633d372f116df493fc0 /modules
parent513b962c1df0921681e76ea6a1a2b8871bc13af4 (diff)
downloadgitea-694f44660f51aa2e8be920c49461380b7db64755.tar.gz
gitea-694f44660f51aa2e8be920c49461380b7db64755.zip
inform participants on UI too (#10473)
* inform participants on UI too * ajust test * refactor getParticipantIDsByIssue
Diffstat (limited to 'modules')
-rw-r--r--modules/util/compare.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/util/compare.go b/modules/util/compare.go
index f1d1e5718e..d4f77aed3b 100644
--- a/modules/util/compare.go
+++ b/modules/util/compare.go
@@ -45,6 +45,16 @@ func IsStringInSlice(target string, slice []string) bool {
return false
}
+// IsInt64InSlice sequential searches if int64 exists in slice.
+func IsInt64InSlice(target int64, slice []int64) bool {
+ for i := 0; i < len(slice); i++ {
+ if slice[i] == target {
+ return true
+ }
+ }
+ return false
+}
+
// IsEqualSlice returns true if slices are equal.
func IsEqualSlice(target []string, source []string) bool {
if len(target) != len(source) {