rpc/encode/encode.go
crusader 0c7808f8e3 ing
2017-10-26 16:21:35 +09:00

19 lines
302 B
Go

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{}