operations: make ReOpen and NewReOpen public for re-use elsewhere

This commit is contained in:
Nick Craig-Wood 2020-02-13 14:27:50 +00:00
parent cd3c699f28
commit 7f15cc9556
4 changed files with 12 additions and 12 deletions

View file

@ -15,7 +15,7 @@ import (
)
// check interface
var _ io.ReadCloser = (*reOpen)(nil)
var _ io.ReadCloser = (*ReOpen)(nil)
var errorTestError = errors.New("test error")
@ -74,7 +74,7 @@ func TestReOpen(t *testing.T) {
breaks: breaks,
}
hashOption := &fs.HashesOption{Hashes: hash.NewHashSet(hash.MD5)}
return newReOpen(context.Background(), src, hashOption, rangeOption, maxRetries)
return NewReOpen(context.Background(), src, hashOption, rangeOption, maxRetries)
}
t.Run("Basics", func(t *testing.T) {