MCPcopy
hub / github.com/danielgtaylor/huma / mapTo

Function mapTo

validate_test.go:22–28  ·  view source on GitHub ↗
(s []A, f func(A) B)

Source from the content-addressed store, hash-verified

20}
21
22func mapTo[A, B any](s []A, f func(A) B) []B {
23 r := make([]B, len(s))
24 for i, v := range s {
25 r[i] = f(v)
26 }
27 return r
28}
29
30var validateTests = []struct {
31 name string

Callers 1

TestValidateFunction · 0.70

Calls 1

fFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…