Fix encoder name bug; remove unused field in encode middleware struct

This commit is contained in:
Matthew Holt
2019-06-29 16:57:55 -06:00
parent d5ae3a4966
commit fee0b38b48
4 changed files with 31 additions and 21 deletions
+4
View File
@@ -16,6 +16,10 @@ func init() {
// Zstd can create zstd encoders.
type Zstd struct{}
// AcceptEncoding returns the name of the encoding as
// used in the Accept-Encoding request headers.
func (Zstd) AcceptEncoding() string { return "zstd" }
// NewEncoder returns a new gzip writer.
func (z Zstd) NewEncoder() encode.Encoder {
writer, _ := zstd.NewWriter(nil)