// addTypeImports adds the imports related to the types to the cache.
addTypeImports adds the imports related to the types to the cache.
// addTypeImports adds the imports related to the types to the cache .
func addTypeImports(pkgCache *PkgCache, typ types.Type) error {
	pkgs, err := getTypePkgs(typ)
	if err != nil {
		return err
	}
	for _, pkg := range pkgs {
		pkgCache.Add(pkg)
	}
	return nil
}
func addTypeImports ( pkgCache * PkgCache , typ types . Type ) error { pkgs , err := getTypePkgs ( typ ) if err != nil { return err } for _ , pkg := range pkgs { pkgCache . Add ( pkg ) } return nil }
addTypeImports adds the imports related to the types to the cache.
addTypeImports adds the imports related to the types to the cache .