Files
anydb/app/generic.go

11 lines
177 B
Go
Raw Permalink Normal View History

2024-12-17 14:23:56 +01:00
package app
// look if a key in a map exists, generic variant
func Exists[K comparable, V any](m map[K]V, v K) bool {
if _, ok := m[v]; ok {
return true
}
return false
}