Oid: remove Bytes()
This is not needed. We can do id[:] to get a slice.
This commit is contained in:
parent
c9c7c1e779
commit
c243c31f7d
6
git.go
6
git.go
|
@ -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[:])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue