mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
* fix #2002 `CS AMODE #channel +f nickname` is invalid, but was being accepted incorrectly. * simplify logic
This commit is contained in:
parent
c3b3bf9941
commit
e20c983b57
2 changed files with 19 additions and 1 deletions
|
|
@ -34,3 +34,12 @@ func ReverseSlice[T any](results []T) {
|
|||
results[i], results[j] = results[j], results[i]
|
||||
}
|
||||
}
|
||||
|
||||
func SliceContains[T comparable](slice []T, elem T) (result bool) {
|
||||
for _, t := range slice {
|
||||
if elem == t {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue