MCPcopy Index your code
hub / github.com/coder/coder / takeFirstMap

Function takeFirstMap

coderd/database/dbgen/dbgen.go:2127–2131  ·  view source on GitHub ↗
(values ...map[T]E)

Source from the content-addressed store, hash-verified

2125}
2126
2127func takeFirstMap[T, E comparable](values ...map[T]E) map[T]E {
2128 return takeFirstF(values, func(v map[T]E) bool {
2129 return v != nil
2130 })
2131}
2132
2133// takeFirstF takes the first value that returns true
2134func takeFirstF[Value any](values []Value, take func(v Value) bool) Value {

Callers 1

ProvisionerDaemonFunction · 0.85

Calls 1

takeFirstFFunction · 0.70

Tested by

no test coverage detected