feat: implement GenericLoader for batch processing and utility functions

This commit is contained in:
2026-04-17 15:58:08 -05:00
parent 93b302db8e
commit 846a49d40c
4 changed files with 19 additions and 19 deletions

View File

@@ -0,0 +1,11 @@
package loaders
func mapSlice[T any, V any](input []T, mapper func(T) V) []V {
result := make([]V, len(input))
for i, v := range input {
result[i] = mapper(v)
}
return result
}