From c8e1328164e9ffbd681c3c0e449f1e6b9856b896 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 26 Feb 2023 19:54:48 +0100 Subject: feat: Inicial commit It contains rough template for the server and runners. It contains rough template for the server and runners. --- pkg/list/list.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pkg/list/list.go (limited to 'pkg/list') diff --git a/pkg/list/list.go b/pkg/list/list.go new file mode 100644 index 0000000..ff259f7 --- /dev/null +++ b/pkg/list/list.go @@ -0,0 +1,9 @@ +package list + +func Map[V any, T any](source []V, fun func(V) T) []T { + result := make([]T, 0, len(source)) + for _, s := range source { + result = append(result, fun(s)) + } + return result +} -- cgit v1.2.3