mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-18 10:42:37 +02:00
move server to server directory.
This commit is contained in:
parent
da45f62ca8
commit
cfb423b13d
211 changed files with 18 additions and 10 deletions
14
server/pkg/utils/array.go
Normal file
14
server/pkg/utils/array.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package utils
|
||||
|
||||
func ArrayIn[T comparable](val T, array []T) (exists bool, index int) {
|
||||
exists, index = false, -1
|
||||
|
||||
for i, a := range array {
|
||||
if a == val {
|
||||
exists, index = true, i
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue