// addObjImports adds the imports related to the object to the cache.
addObjImports adds the imports related to the object to the cache.
// addObjImports adds the imports related to the object to the cache .
func addObjImports(pkgCache *PkgCache, obj types.Object) error {
	pkgs, err := getObjPkgs(obj)
	if err != nil {
		return err
	}
	for _, pkg := range pkgs {
		pkgCache.Add(pkg)
	}
	return nil
}
func addObjImports ( pkgCache * PkgCache , obj types . Object ) error { pkgs , err := getObjPkgs ( obj ) if err != nil { return err } for _ , pkg := range pkgs { pkgCache . Add ( pkg ) } return nil }
addObjImports adds the imports related to the object to the cache.
addObjImports adds the imports related to the object to the cache .