summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-03-19 03:11:41 +0100
committerCarlos Martín Nieto <[email protected]>2014-03-19 03:56:50 +0100
commitc243c31f7d428680579a1dd20273cd3888c730e4 (patch)
tree1c6b5035170c15c2efd794c4ec65c6df0d441fc3 /git.go
parentc9c7c1e77942f88955af0dc3bdfb58d5e7d7f121 (diff)
Oid: remove Bytes()
This is not needed. We can do id[:] to get a slice.
Diffstat (limited to 'git.go')
-rw-r--r--git.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/git.go b/git.go
index f3fb7e1..9e1d3e7 100644
--- a/git.go
+++ b/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[:])
}