chore: add edit organization role to cli (#13365)

Editing custom org roles from hidden org cli command.
This commit is contained in:
Steven Masley
2024-06-03 09:34:10 -05:00
committed by GitHub
parent 24ba81930b
commit 973cc2b875
8 changed files with 484 additions and 23 deletions
+9
View File
@@ -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))