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. --- tree.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tree.go') diff --git a/tree.go b/tree.go index f5cbd78..ee14ec5 100644 --- a/tree.go +++ b/tree.go @@ -27,6 +27,10 @@ type Tree struct { cast_ptr *C.git_tree } +func (t *Tree) AsObject() *Object { + return &t.Object +} + type TreeEntry struct { Name string Id *Oid -- cgit v1.2.3