Enable Uploading/Removing Attachments When Editing an Issue/Comment (#8426)
This commit is contained in:
parent
d7d348ea86
commit
8c909820a9
10 changed files with 316 additions and 39 deletions
|
@ -35,6 +35,16 @@ func ExistsInSlice(target string, slice []string) bool {
|
|||
return i < len(slice)
|
||||
}
|
||||
|
||||
// IsStringInSlice sequential searches if string exists in slice.
|
||||
func IsStringInSlice(target string, slice []string) 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue