11 lines
174 B
Go
11 lines
174 B
Go
package helpers
|
|
|
|
func IsOneOf[T comparable](value T, choices ...T) (ok bool) {
|
|
for _, choice := range choices {
|
|
if value == choice {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|