From 7f685a6ee64db446a8b2d05f98796a1bf63984d9 Mon Sep 17 00:00:00 2001 From: Carlos Martín Nieto Date: Sat, 8 Jul 2017 22:53:50 +0200 Subject: Add Objecer interface We do want to be able to accept generic objects in functions. Add this interface so we can accept that instead of specific object types. --- tag.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tag.go') diff --git a/tag.go b/tag.go index a58b090..9e26174 100644 --- a/tag.go +++ b/tag.go @@ -17,6 +17,10 @@ type Tag struct { cast_ptr *C.git_tag } +func (t *Tag) AsObject() *Object { + return &t.Object +} + func (t Tag) Message() string { ret := C.GoString(C.git_tag_message(t.cast_ptr)) runtime.KeepAlive(t) -- cgit v1.2.3