FILE / ScuroNeko/SNekLog

utils.go

Исходный файл и его история в репозитории.
FILE e6d15b530f892fe196da6203ba9383e21c5548fc
Files
SNekLog/utils.go
T
ScuroNeko d534f92d48 (refactor): prepare breaking v2 API
- rename package to sneklog and move module to /v2
- replace text output flags with writer formatters
- remove external color dependencies
- update migration notes and coverage
2026-04-24 15:43:14 +03:00

11 lines
217 B
Go

package sneklog
// Map applies f to each element of s and returns the resulting slice.
func Map[T, R any](s []T, f func(T) R) []R {
out := make([]R, len(s))
for i, el := range s {
out[i] = f(el)
}
return out
}