rpc/encode/encode.go

19 lines
302 B
Go
Raw Normal View History

2017-10-26 07:21:35 +00:00
package encode
import "io"
// Encoder interface contains the encoder for http response.
// Eg. gzip, flate compressions.
type Encoder interface {
Encode(w io.Writer) io.Writer
}
type encoder struct {
}
func (_ *encoder) Encode(w io.Writer) io.Writer {
return w
}
var DefaultEncoder = &encoder{}