mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add edit organization role to cli (#13365)
Editing custom org roles from hidden org cli command.
This commit is contained in:
@@ -4,6 +4,15 @@ import (
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
// ToStrings works for any type where the base type is a string.
|
||||
func ToStrings[T ~string](a []T) []string {
|
||||
tmp := make([]string, 0, len(a))
|
||||
for _, v := range a {
|
||||
tmp = append(tmp, string(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