Making donut use io.ReadWriteSeek instead of io.Writer

This commit is contained in:
Frederick F. Kautz IV
2015-02-23 20:27:25 -08:00
parent 0f45e17505
commit ef442289da
2 changed files with 26 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ type DonutFooter struct {
}
type Donut struct {
file io.Writer
file io.ReadWriteSeeker
mutex *sync.RWMutex
}
@@ -89,7 +89,7 @@ type EncodedChunk struct {
Offset int
}
func New(file io.Writer) *Donut {
func New(file io.ReadWriteSeeker) *Donut {
donut := Donut{}
donut.mutex = new(sync.RWMutex)
donut.file = file