func (h *ParsedSourceDocHandler) AddToIndex(src, pkg string) error {
	fset := token.NewFileSet()
	ps, err := parser.ParseDir(fset, src, func(i os.FileInfo) bool { return true }, parser.ParseComments)
	if err != nil {
		return err
	}
	for n, p := range ps {
		importPath := n
		if pkg != "" {
			importPath = fmt.Sprintf("%s/%s", strings.TrimRight(pkg, "/"), n)
		}
		h.pkgs[importPath] = doc.New(p, importPath, 0)
	}
	return nil
}
AddToIndex adds another package to the handler's index. src is the path to the Go src folder of the package, pkg is its import path
package bel
import (
	"fmt"
	"go/ast"
	"go/doc"
	"go/parser"
	"go/token"
	"os"
	"reflect"
	"strings"
)
type DocHandler interface {
	Type(t reflect.Type) string
	Method(parent reflect.Type, method reflect.Method) string
}
type nullDocHandler string
func (*nullDocHandler) Type(t reflect.Type) string {
	return ""
}
func (*nullDocHandler) Method(parent reflect.Type, method reflect.Method) string {
	return ""
}
type ParsedSourceDocHandler struct {
	pkgs map[string]*doc.Package
}
func NewParsedSourceDocHandler(srcdir, base string) (*ParsedSourceDocHandler, error) {
	res := &ParsedSourceDocHandler{pkgs: make(map[string]*doc.Package)}
	if err := res.AddToIndex(srcdir, base); err != nil {
		return nil, err
	}
	return res, nil
}