From 0058490f5182f97db30911112bb73f79522b6624 Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Tue, 28 Jul 2015 14:33:47 +0200 Subject: [PATCH] bind: split Type into Type+Object --- bind/types.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bind/types.go b/bind/types.go index 86da09d..6387047 100644 --- a/bind/types.go +++ b/bind/types.go @@ -8,15 +8,19 @@ import ( "golang.org/x/tools/go/types" ) -type Type interface { +type Object interface { Package() *Package - GoType() types.Type - GoName() string ID() string Doc() string + GoName() string Obj() types.Object } +type Type interface { + Object + GoType() types.Type +} + func needWrapType(typ types.Type) bool { switch typ.(type) { case *types.Struct: