diff options
| author | Jeff Carr <[email protected]> | 2025-09-22 16:58:31 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-22 16:58:31 -0500 |
| commit | 020dd376224a6fd60fab17c3957d1815daa2a635 (patch) | |
| tree | fafb07a9db9bb63458577e616e8fef678028180d /wit.go | |
| parent | 9e49784b9e375b234e37befe950d1ce0f39bd1b4 (diff) | |
redo init() and config()v0.0.64
Diffstat (limited to 'wit.go')
| -rw-r--r-- | wit.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) } |
