Oid: remove Bytes()

This is not needed. We can do id[:] to get a slice.
This commit is contained in:
Carlos Martín Nieto 2014-03-19 03:11:41 +01:00
parent c9c7c1e779
commit c243c31f7d
1 changed files with 1 additions and 5 deletions

6
git.go
View File

@ -28,7 +28,7 @@ func init() {
C.git_threads_init()
}
// Oid
// Oid represents the id for a Git object.
type Oid [20]byte
func newOidFromC(coid *C.git_oid) *Oid {
@ -72,10 +72,6 @@ func (oid *Oid) String() string {
return string(buf)
}
func (oid *Oid) Bytes() []byte {
return oid[0:]
}
func (oid *Oid) Cmp(oid2 *Oid) int {
return bytes.Compare(oid[:], oid2[:])
}