Feat: switch team; team model
This commit is contained in:
@ -22,3 +22,16 @@ func StrInSlice(key string, sl []string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func RemoveFromSlice(key string, sl []string) []string {
|
||||
if !StrInSlice(key, sl) {
|
||||
return sl
|
||||
}
|
||||
resp := []string{}
|
||||
for _, el := range sl {
|
||||
if el != key {
|
||||
resp = append(resp, el)
|
||||
}
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
Reference in New Issue
Block a user