From 113c72fdd4897da333db0650fbd05900515016cc Mon Sep 17 00:00:00 2001 From: Asparuh Krastev Date: Thu, 26 Oct 2023 14:20:13 +0300 Subject: [PATCH] Checks --- bind/package.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bind/package.go b/bind/package.go index 41d37e2..2136abb 100644 --- a/bind/package.go +++ b/bind/package.go @@ -122,6 +122,9 @@ func (p *Package) getDoc(parent string, o types.Object) string { } // Check for typed consts scopeName := p.pkg.Scope().Lookup(n) + if scopeName == nil { + return "" + } constType := scopeName.Type() if constType == nil { return ""