ut/utio/io.go

22 lines
401 B
Go
Raw Normal View History

package utio
import (
"io"
)
// ReadFunc defines a read function.
type ReadFunc func(io.Reader) error
// WriteFunc defines a write function.
type WriteFunc func(io.Writer) error
// Decoder exposes a decoder for a specific value/type.
type Decoder interface {
Decode(io.Reader) error
}
// Encoder exposes an encoder for a specific value/type.
type Encoder interface {
Encode(io.Writer) error
}