summaryrefslogtreecommitdiff
path: root/misc_utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc_utils.go')
-rw-r--r--misc_utils.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc_utils.go b/misc_utils.go
index d541118..94b8522 100644
--- a/misc_utils.go
+++ b/misc_utils.go
@@ -51,3 +51,11 @@ func randomString(sz int) (string, error) {
}
return base64.RawURLEncoding.EncodeToString(r), nil
}
+
+func getKeysOfMap[K comparable, V any](i map[K]V) []K {
+ o := make([]K, 0, len(i))
+ for k := range i {
+ o = append(o, k)
+ }
+ return o
+}