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

Function takeFirst

coderd/database/dbgen/dbgen.go:2149–2154  ·  view source on GitHub ↗

takeFirst will take the first non-empty value.

(values ...Value)

Source from the content-addressed store, hash-verified

2147
2148// takeFirst will take the first non-empty value.
2149func takeFirst[Value comparable](values ...Value) Value {
2150 var empty Value
2151 return takeFirstF(values, func(v Value) bool {
2152 return v != empty
2153 })
2154}
2155
2156func newCryptoKeySecret(feature database.CryptoKeyFeature) (string, error) {
2157 switch feature {

Callers 15

AuditLogFunction · 0.70
ChatFunction · 0.70
ChatMessageFunction · 0.70
ChatModelConfigFunction · 0.70
AIProviderFunction · 0.70
AIProviderKeyFunction · 0.70
ChatProviderFunction · 0.70
MCPServerConfigFunction · 0.70
ConnectionLogFunction · 0.70
BoundarySessionFunction · 0.70
BoundaryLogFunction · 0.70
TemplateFunction · 0.70

Calls 1

takeFirstFFunction · 0.70

Tested by

no test coverage detected