(out interface{}, env, hash string)
| 592 | } |
| 593 | |
| 594 | func LoadPackage(out interface{}, env, hash string) error { |
| 595 | VLog(" - load package:", hash) |
| 596 | ipath, err := InstallPath(env, "", true) |
| 597 | if err != nil { |
| 598 | return err |
| 599 | } |
| 600 | |
| 601 | p := filepath.Join(ipath, "gx", "ipfs", hash) |
| 602 | err = FindPackageInDir(out, p) |
| 603 | if err == nil { |
| 604 | return nil |
| 605 | } |
| 606 | |
| 607 | ipath, err = InstallPath(env, "", false) |
| 608 | if err != nil { |
| 609 | return err |
| 610 | } |
| 611 | |
| 612 | p = filepath.Join(ipath, "gx", "ipfs", hash) |
| 613 | return FindPackageInDir(out, p) |
| 614 | } |
| 615 | |
| 616 | var ErrUnrecognizedName = fmt.Errorf("unrecognized package name") |
| 617 |
no test coverage detected