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

Function ToStrings

coderd/util/slice/slice.go:27–33  ·  view source on GitHub ↗

ToStrings works for any type where the base type is a string.

(a []T)

Source from the content-addressed store, hash-verified

25
26// ToStrings works for any type where the base type is a string.
27func ToStrings[T ~string](a []T) []string {
28 tmp := make([]string, 0, len(a))
29 for _, v := range a {
30 tmp = append(tmp, string(v))
31 }
32 return tmp
33}
34
35func StringEnums[E ~string](a []string) []E {
36 if a == nil {

Callers 13

ExternalAuthConfigFunction · 0.92
interactiveOrgRoleEditFunction · 0.92
provisionerJobsListMethod · 0.92
provisionerListMethod · 0.92
taskListMethod · 0.92
joinScopesFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected