summaryrefslogtreecommitdiff
path: root/wit.go
diff options
context:
space:
mode:
Diffstat (limited to 'wit.go')
-rw-r--r--wit.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/wit.go b/wit.go
index b678a57..2e118c6 100644
--- a/wit.go
+++ b/wit.go
@@ -19,6 +19,12 @@ func (m *Machine) IsInstalled(name string) bool {
}
func (m *Machine) FindInstalledByName(name string) *Package {
+ if m == nil {
+ panic("m == nil")
+ }
+ if m.Packages == nil {
+ panic("m.Packages == nil")
+ }
for p := range m.Packages.IterByName() {
if name == p.Name {
// log.Info("package installed:", p.Name, p.Version, p.PkgName)
@@ -77,7 +83,7 @@ func (m *Machine) FindByVersion(name string, version string) *Package {
// read the package list file from mirrors.wit.com
// obviously a hack at this point
-func (m *Machine) InitWit() error {
+func (m *Machine) InitWitMirrors() error {
if m.Wit == nil {
m.Wit = new(Packages)
}