EdgexAgent/device-gps-go/vendor/nhooyr.io/websocket/internal/util/util.go

16 lines
346 B
Go
Raw Normal View History

2025-07-10 20:30:06 +08:00
package util
// WriterFunc is used to implement one off io.Writers.
type WriterFunc func(p []byte) (int, error)
func (f WriterFunc) Write(p []byte) (int, error) {
return f(p)
}
// ReaderFunc is used to implement one off io.Readers.
type ReaderFunc func(p []byte) (int, error)
func (f ReaderFunc) Read(p []byte) (int, error) {
return f(p)
}