From c50cf88dd04545ddee809e29b6c0d55a768507a5 Mon Sep 17 00:00:00 2001
From: Samuel Becker <12024604-beckersam@users.noreply.gitlab.com>
Date: Thu, 19 Jan 2023 12:51:46 +0100
Subject: [PATCH] Added function to send a single value into a channel. Is a
wrapper for goroutines and similar where a return value can't be collected
Also added Goland's file things
---
.idea/.gitignore | 8 ++++++++
.idea/goutils.iml | 9 +++++++++
.idea/modules.xml | 8 ++++++++
.idea/vcs.xml | 6 ++++++
pkg/other/other.go | 8 ++++++++
5 files changed, 39 insertions(+)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/goutils.iml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 pkg/other/other.go
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/goutils.iml b/.idea/goutils.iml
new file mode 100644
index 0000000..5e764c4
--- /dev/null
+++ b/.idea/goutils.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..aa5694d
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pkg/other/other.go b/pkg/other/other.go
new file mode 100644
index 0000000..ebc1c3a
--- /dev/null
+++ b/pkg/other/other.go
@@ -0,0 +1,8 @@
+package other
+
+// OutputIntoChannel takes a singular return value and sends it into the target channel.
+// This is a wrapper for functions where a value can't be collected from directly.
+// Example: goroutines
+func OutputIntoChannel[T any](out T, target chan T) {
+ target <- out
+}