summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--optional/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/optional/main.go b/optional/main.go
new file mode 100644
index 0000000..6cc494a
--- /dev/null
+++ b/optional/main.go
@@ -0,0 +1,6 @@
+package optional
+
+type Optional[T any] struct {
+ Value T
+ Exists bool
+}