Skip to content

Commit

Permalink
Use default writer
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Aug 29, 2020
1 parent c161a02 commit bcc87bb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cacher/cacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@ func (c *Cacher) Save(ctx context.Context, i *SaveRequest) (retErr error) {
}

// Create the gzip writer
gzw, err := gzip.NewWriterLevel(gcsw, gzip.BestSpeed)
if err != nil {
retErr = fmt.Errorf("failed to create gzip writer: %w", err)
return
}
gzw := gzip.NewWriter(gcsw)
defer func() {
c.log("closing gzip writer")
if cerr := gzw.Close(); cerr != nil {
Expand Down

0 comments on commit bcc87bb

Please sign in to comment.