summaryrefslogtreecommitdiff
path: root/tag.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-08-04 14:47:10 +0200
committerCarlos Martín Nieto <[email protected]>2015-08-04 14:47:10 +0200
commitb7159b0cd4b25ee3b1a8eb9e0d4991d297487a36 (patch)
tree0228b23ba724935ed417f4d3bf151fe4e28e2ae2 /tag.go
parent5d989f2caddad21d0296cd9a6a83cabce88858d5 (diff)
Move from an Object interface to a type
An Object should be about representing a libgit2 object rather than showing which methods it should support. Change any return of Object to *Object and provide methods to convert between this and the particular type.
Diffstat (limited to 'tag.go')
-rw-r--r--tag.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tag.go b/tag.go
index ca85156..8957430 100644
--- a/tag.go
+++ b/tag.go
@@ -13,7 +13,7 @@ import (
// Tag
type Tag struct {
- gitObject
+ Object
cast_ptr *C.git_tag
}
@@ -30,7 +30,7 @@ func (t Tag) Tagger() *Signature {
return newSignatureFromC(cast_ptr)
}
-func (t Tag) Target() Object {
+func (t Tag) Target() *Object {
var ptr *C.git_object
ret := C.git_tag_target(&ptr, t.cast_ptr)
@@ -70,7 +70,7 @@ func (c *TagsCollection) Create(
}
defer C.git_signature_free(taggerSig)
- ctarget := commit.gitObject.ptr
+ ctarget := commit.ptr
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -102,7 +102,7 @@ func (c *TagsCollection) CreateLightweight(name string, commit *Commit, force bo
cname := C.CString(name)
defer C.free(unsafe.Pointer(cname))
- ctarget := commit.gitObject.ptr
+ ctarget := commit.ptr
runtime.LockOSThread()
defer runtime.UnlockOSThread()