Skip to content

Commit

Permalink
close truncate bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
philchia committed Dec 23, 2016
1 parent 9064358 commit 05d2562
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions adapter/fake/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func (w *Writer) Write(b []byte) (int, error) {

// Close will do nothing
func (w *Writer) Close() error {
w.b = w.b[0:0]
return nil
}

Expand Down
1 change: 1 addition & 0 deletions adapter/fakeSync/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (w *ReadWriter) Write(b []byte) (int, error) {

// Close will do nothing
func (w *ReadWriter) Close() error {
w.b = w.b[0:0]
return nil
}

Expand Down

0 comments on commit 05d2562

Please sign in to comment.