19 lines
302 B
Go
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{}
|