aboutsummaryrefslogtreecommitdiff
path: root/go/utils
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-01 18:46:32 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:45 +0100
commit21a87ffccae9950580a240180fd3703768ef450e (patch)
tree1cb83289216bd1e213d417812b4e09001ca89c09 /go/utils
parent3fd15c9b83fff074b588ff9688f9e49aab38cd32 (diff)
downloadmuhqs-game-21a87ffccae9950580a240180fd3703768ef450e.tar.gz
muhqs-game-21a87ffccae9950580a240180fd3703768ef450e.zip
intermediate commit
Diffstat (limited to 'go/utils')
-rw-r--r--go/utils/slices.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/go/utils/slices.go b/go/utils/slices.go
new file mode 100644
index 00000000..d2bc04c1
--- /dev/null
+++ b/go/utils/slices.go
@@ -0,0 +1,9 @@
+package utils
+
+func TypedSliceToInterfaceSlice[T any](s []T) []interface{} {
+ is := make([]interface{}, 0, len(s))
+ for _, t := range s {
+ is = append(is, t)
+ }
+ return is
+}