Files
x/encoding/coder.go

11 lines
315 B
Go
Raw Normal View History

// Package encoding provides generic encoder and decoder function types.
package encoding
import "io"
// Encoder is a function that encodes data to a writer.
type Encoder func(io.Writer, interface{}) error
// Decoder is a function that decodes data from a reader.
type Decoder func(io.Reader, interface{}) error