v0.0.342 support json data in enum comment
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m29s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m29s
This commit is contained in:
@@ -29,6 +29,14 @@ func ArrToMap[T comparable, V any](a []V, keyfunc func(V) T) map[T]V {
|
||||
return result
|
||||
}
|
||||
|
||||
func ArrToKVMap[T any, K comparable, V any](a []T, keyfunc func(T) K, valfunc func(T) V) map[K]V {
|
||||
result := make(map[K]V, len(a))
|
||||
for _, v := range a {
|
||||
result[keyfunc(v)] = valfunc(v)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func ArrToSet[T comparable](a []T) map[T]bool {
|
||||
result := make(map[T]bool, len(a))
|
||||
for _, v := range a {
|
||||
|
Reference in New Issue
Block a user