mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat(coderd): add endpoint to list provisioner jobs (#16029)
Closes #15190 Updates #15084
This commit is contained in:
committed by
GitHub
parent
0e8ef09415
commit
3864c7e3b0
@@ -13,6 +13,17 @@ func ToStrings[T ~string](a []T) []string {
|
||||
return tmp
|
||||
}
|
||||
|
||||
func StringEnums[E ~string](a []string) []E {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := make([]E, 0, len(a))
|
||||
for _, v := range a {
|
||||
tmp = append(tmp, E(v))
|
||||
}
|
||||
return tmp
|
||||
}
|
||||
|
||||
// Omit creates a new slice with the arguments omitted from the list.
|
||||
func Omit[T comparable](a []T, omits ...T) []T {
|
||||
tmp := make([]T, 0, len(a))
|
||||
|
||||
Reference in New Issue
Block a user