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

Function takeFirst

coderd/database/dbfake/dbfake.go:896–901  ·  view source on GitHub ↗

takeFirst will take the first non-empty value.

(values ...Value)

Source from the content-addressed store, hash-verified

894
895// takeFirst will take the first non-empty value.
896func takeFirst[Value comparable](values ...Value) Value {
897 var empty Value
898 return takeFirstF(values, func(v Value) bool {
899 return v != empty
900 })
901}
902
903// takeFirstTime returns the first non-zero time.Time.
904func takeFirstTime(values ...time.Time) time.Time {

Callers 3

WithTaskMethod · 0.70
doInTXMethod · 0.70
DoMethod · 0.70

Calls 1

takeFirstFFunction · 0.70

Tested by

no test coverage detected