diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-07 20:29:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 20:29:58 +0100 |
commit | 0ff9ef2b44c53e557c78bde0fd9c29847e5f0e23 (patch) | |
tree | b9c7485fe99e6e89fa736ceb0223aeb2ecddb77c /tree_test.go | |
parent | f6ed7424cbf33c7013332d7e95b4262a4bc4a523 (diff) | |
download | go-git-0ff9ef2b44c53e557c78bde0fd9c29847e5f0e23.tar.gz |
global storage interface refactor (#112)
* core: ObjectStorage, ReferenceStorage renamed to ObjectStorer and
ReferenceStorer
* rebase
* general, changes request by @alcortes
* general, changes request by @alcortes
Diffstat (limited to 'tree_test.go')
-rw-r--r-- | tree_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tree_test.go b/tree_test.go index 86b4851..3220490 100644 --- a/tree_test.go +++ b/tree_test.go @@ -37,7 +37,7 @@ func (s *TreeSuite) TestDecode(c *C) { func (s *TreeSuite) TestDecodeNonTree(c *C) { hash := core.NewHash("9a48f23120e880dfbe41f7c9b7b708e9ee62a492") - blob, err := s.Repository.s.ObjectStorage().Get(core.BlobObject, hash) + blob, err := s.Repository.s.Object(core.BlobObject, hash) c.Assert(err, IsNil) tree := &Tree{} @@ -89,12 +89,12 @@ func (o *SortReadObject) SetType(t core.ObjectType) { o.t = t } func (o *SortReadObject) Size() int64 { return o.sz } func (o *SortReadObject) SetSize(s int64) { o.sz = s } func (o *SortReadObject) Content() []byte { return o.cont } -func (o *SortReadObject) Reader() (core.ObjectReader, error) { +func (o *SortReadObject) Reader() (io.ReadCloser, error) { return &SortReadCloser{pos: 0, data: o.cont}, nil } -func (o *SortReadObject) Writer() (core.ObjectWriter, error) { return o, nil } -func (o *SortReadObject) Write(p []byte) (n int, err error) { return len(p), nil } -func (o *SortReadObject) Close() error { return nil } +func (o *SortReadObject) Writer() (io.WriteCloser, error) { return o, nil } +func (o *SortReadObject) Write(p []byte) (n int, err error) { return len(p), nil } +func (o *SortReadObject) Close() error { return nil } // a ReadCloser that only returns 6 bytes at a time, to simulate incomplete reads. type SortReadCloser struct { |