From 2354c7a93f92600fa06876208f6a5eef230ea456 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 12 Jan 2025 11:41:14 +0800 Subject: [PATCH] misc: Add Duplex --- misc/io.go | 8 ++++++++ diff --git a/misc/io.go b/misc/io.go new file mode 100644 index 0000000000000000000000000000000000000000..5f9a13c24a472152bb6e9d14f1b265918fe091ec --- /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) +} -- 2.48.1