func (p *PackageInfo) Inspect(fn func(Facade) bool) {
	for _, file := range p.Files {
		for _, fa := range file.facade {
			if !fn(fa) {
				return
			}
		}
	}
}
Inspect traverses facades in the package.
package aster
import (
	"fmt"
	"go/ast"
	"go/types"
	"github.com/henrylee2cn/aster/internal/loader"
)
func (p *PackageInfo) check() {
L:
	for ident, obj := range p.info.Defs {
		var node ast.Node
		var file *loader.File
		var nodes []ast.Node
		switch GetObjKind(obj) {
		case Bad, Lbl, Bui, Nil:
			continue L
		case Var:
			if GetTypKind(obj.Type()) != Struct {
				file, nodes, _ = p.pathEnclosingInterval(ident.Pos(), ident.End())
				for i, n := range nodes {
					if i == 1 {
						node = n
					}
					if _, ok := n.(*ast.Field); ok {
						continue L
					}
				}
				break
			}
			fallthrough
		default:
			file, nodes, _ = p.pathEnclosingInterval(ident.Pos(), ident.End())
			for i, n := range nodes {
				if i == 1 {
					node = n
					break
				}
			}
		}
		if file != nil {
			p.addFacade(file, node, ident, obj)
		} else {
			fmt.Println("file==nil:", obj, node)
		}
	}
}
func (prog *Program) Inspect(fn func(Facade) bool) {
	for _, pkg := range prog.InitialPackages() {
		for _, file := range pkg.Files {
			for _, fa := range file.facade {
				if !fn(fa) {
					return
				}
			}
		}
	}
}
func (prog *Program) Lookup(objKindSet ObjKind, typKindSet TypKind, name string) (list []Facade) {
	prog.Inspect(func(fa Facade) bool {
		if (name == "" || fa.Name() == name) &&
			(typKindSet == 0 || fa.TypKind().In(typKindSet)) &&
			(objKindSet == 0 || fa.ObjKind().In(objKindSet)) {
			list = append(list, fa)
		}
		return true
	})
	return
}
func (prog *Program) FindFacade(typ types.Type) (fa Facade, found bool) {
	for _, pkg := range prog.allPackages {
		fa, found = pkg.FindFacade(typ)
		if found {
			return
		}
	}
	return
}