Skip to content

Commit

Permalink
Merge pull request #118 from mcastilho/master
Browse files Browse the repository at this point in the history
Corrupt GZIP stream when calling WriteString
  • Loading branch information
appleboy authored Oct 13, 2016
2 parents 36474aa + d62d5af commit 42277b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gzip/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ type gzipWriter struct {
writer *gzip.Writer
}

func (g *gzipWriter) WriteString(s string) (int, error) {
return g.writer.Write([]byte(s))
}

func (g *gzipWriter) Write(data []byte) (int, error) {
return g.writer.Write(data)
}
Expand Down

0 comments on commit 42277b1

Please sign in to comment.