From 2354c7a93f92600fa06876208f6a5eef230ea456 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 12 Jan 2025 11:41:14 +0800 Subject: misc: Add Duplex --- misc/io.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 misc/io.go (limited to 'misc') 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) +} -- cgit v1.2.3