diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-08 23:46:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-08 23:46:38 +0100 |
commit | ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d (patch) | |
tree | 223f36f336ba3414b1e45cac8af6c4744a5d7ef6 /utils/binary/read.go | |
parent | e523701393598f4fa241dd407af9ff8925507a1a (diff) | |
download | go-git-ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d.tar.gz |
new plumbing package (#118)
* plumbing: now core was renamed to core, and formats and clients moved inside
Diffstat (limited to 'utils/binary/read.go')
-rw-r--r-- | utils/binary/read.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/binary/read.go b/utils/binary/read.go index 90ae41f..8aab3e5 100644 --- a/utils/binary/read.go +++ b/utils/binary/read.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "io" - "gopkg.in/src-d/go-git.v4/core" + "gopkg.in/src-d/go-git.v4/plumbing" ) // Read reads structured binary data from r into data. Bytes are read and @@ -113,11 +113,11 @@ func ReadUint16(r io.Reader) (uint16, error) { return v, nil } -// ReadHash reads a core.Hash from r -func ReadHash(r io.Reader) (core.Hash, error) { - var h core.Hash +// ReadHash reads a plumbing.Hash from r +func ReadHash(r io.Reader) (plumbing.Hash, error) { + var h plumbing.Hash if err := binary.Read(r, binary.BigEndian, h[:]); err != nil { - return core.ZeroHash, err + return plumbing.ZeroHash, err } return h, nil |