define Note methods on pointers

This commit is contained in:
Ben Burkert 2015-01-08 11:03:15 -08:00
parent 4989fc5a15
commit 04e3c7f6cd
No known key found for this signature in database
GPG Key ID: 5AD9C15317B7FDCA
1 changed files with 4 additions and 4 deletions

View File

@ -27,25 +27,25 @@ func (n *Note) Free() error {
} }
// Author returns the signature of the note author // Author returns the signature of the note author
func (n Note) Author() *Signature { func (n *Note) Author() *Signature {
ptr := C.git_note_author(n.ptr) ptr := C.git_note_author(n.ptr)
return newSignatureFromC(ptr) return newSignatureFromC(ptr)
} }
// Id returns the note object's id // Id returns the note object's id
func (n Note) Id() *Oid { func (n *Note) Id() *Oid {
ptr := C.git_note_id(n.ptr) ptr := C.git_note_id(n.ptr)
return newOidFromC(ptr) return newOidFromC(ptr)
} }
// Committer returns the signature of the note committer // Committer returns the signature of the note committer
func (n Note) Committer() *Signature { func (n *Note) Committer() *Signature {
ptr := C.git_note_committer(n.ptr) ptr := C.git_note_committer(n.ptr)
return newSignatureFromC(ptr) return newSignatureFromC(ptr)
} }
// Message returns the note message // Message returns the note message
func (n Note) Message() string { func (n *Note) Message() string {
return C.GoString(C.git_note_message(n.ptr)) return C.GoString(C.git_note_message(n.ptr))
} }