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

Function New

coderd/util/slice/slice.go:173–175  ·  view source on GitHub ↗

New is a convenience method for creating []T.

(items ...T)

Source from the content-addressed store, hash-verified

171
172// New is a convenience method for creating []T.
173func New[T any](items ...T) []T {
174 return items
175}
176
177func Ascending[T constraints.Ordered](a, b T) int {
178 if a < b {

Callers 9

TestAPIKeyMethod · 0.92
TestGroupMethod · 0.92
TestOrganizationMethod · 0.92
TestWorkspaceProxyMethod · 0.92
TestTemplateMethod · 0.92
TestUserMethod · 0.92
TestWorkspaceMethod · 0.92
TestSystemFunctionsMethod · 0.92
TestSameElementsFunction · 0.92

Calls

no outgoing calls

Tested by 9

TestAPIKeyMethod · 0.74
TestGroupMethod · 0.74
TestOrganizationMethod · 0.74
TestWorkspaceProxyMethod · 0.74
TestTemplateMethod · 0.74
TestUserMethod · 0.74
TestWorkspaceMethod · 0.74
TestSystemFunctionsMethod · 0.74
TestSameElementsFunction · 0.74