func ParseDocs(pattern string) ([]Converter, error) {
	pkgs, err := packages.Load(&packages.Config{
		Mode: packages.NeedSyntax | packages.NeedCompiledGoFiles | packages.NeedTypes |
			packages.NeedModule | packages.NeedFiles | packages.NeedName | packages.NeedImports,
	}, pattern)
	if err != nil {
		return nil, err
	}
	mapping := []Converter{}
	for _, pkg := range pkgs {
		if len(pkg.Errors) > 0 {
			return nil, pkg.Errors[0]
		}
		for _, file := range pkg.Syntax {
			for _, decl := range file.Decls {
				if genDecl, ok := decl.(*ast.GenDecl); ok {
					var err error
					if mapping, err = parseGenDecl(mapping, genDecl); err != nil {
						return mapping, fmt.Errorf("%s: %s", pkg.Fset.Position(genDecl.Pos()), err)
					}
				}
			}
		}
	}
	sort.Slice(mapping, func(i, j int) bool {
		return mapping[i].Config.Name < mapping[j].Config.Name
	})
	return mapping, nil
}
ParseDocs parses the docs for the given pattern.
package comments
import (
	"bufio"
	"fmt"
	"go/ast"
	"sort"
	"strings"
	"golang.org/x/tools/go/packages"
)
const (
	prefix          = "goverter"
	delimter        = ":"
	converterMarker = prefix + delimter + "converter"
)
type MethodMapping map[string]Method
type Converter struct {
	Name    string
	Config  ConverterConfig
	Methods MethodMapping
}
type ConverterConfig struct {
	Name          string
	ExtendMethods []string
}
type Method struct {
	IgnoredFields map[string]struct{}
	NameMapping   map[string]string
	IdentityMapping map[string]struct{}
}