shared/generate/db/parse.go
func Packages() (map[string]*ast.Package, error) {
	packages := map[string]*ast.Package{}

	for _, name := range defaultPackages {
		pkg, err := lex.Parse(name)
		if err != nil {
			return nil, errors.Wrapf(err, "Parse %q", name)
		}
		parts := strings.Split(name, "/")
		packages[parts[len(parts)-1]] = pkg
	}

	return packages, nil
}
func Packages() (map[string]*ast.Package, error) {
	packages := map[string]*ast.Package{}

	for _, name := range defaultPackages {
		pkg, err := lex.Parse(name)
		if err != nil {
			return nil, errors.Wrapf(err, "Parse %q", name)
		}
		parts := strings.Split(name, "/")
		packages[parts[len(parts)-1]] = pkg
	}

	return packages, nil
}
// Packages returns the the AST packages in which to search for structs.
//
// By default it includes the lxd/db and shared/api packages.