woodpecker-docker-buildx/utils/lamda.go
2023-05-02 19:25:49 +00:00

10 lines
130 B
Go

package utils
func Map[T any](in []T, fn func(T) T) []T {
out := in
for i := range in {
out[i] = fn(out[i])
}
return out
}