aboutsummaryrefslogtreecommitdiff
path: root/misc/io.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-01-12 11:41:14 +0800
committerRunxi Yu <me@runxiyu.org>2025-01-12 11:41:14 +0800
commit2354c7a93f92600fa06876208f6a5eef230ea456 (patch)
tree1176053dde4e9173eeec0c011213ab5cfef259a2 /misc/io.go
parentmailkit: Strip_angle_brackets (diff)
downloadgo-lindenii-common-2354c7a93f92600fa06876208f6a5eef230ea456.tar.gz
go-lindenii-common-2354c7a93f92600fa06876208f6a5eef230ea456.tar.zst
go-lindenii-common-2354c7a93f92600fa06876208f6a5eef230ea456.zip
misc: Add Duplex
Diffstat (limited to 'misc/io.go')
-rw-r--r--misc/io.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/io.go b/misc/io.go
new file mode 100644
index 0000000..5f9a13c
--- /dev/null
+++ b/misc/io.go
@@ -0,0 +1,8 @@
+package misc
+
+// Duplex is an interface that wraps the basic Read and Write method. It is the
+// intersection between io.Reader and io.Writer.
+type Duplex interface {
+ Read(p []byte) (n int, err error)
+ Write(p []byte) (n int, err error)
+}