init Wit if nil

This commit is contained in:
Jeff Carr 2024-11-22 11:31:41 -06:00
parent 84d25808e5
commit 1ecaeb97e3
1 changed files with 8 additions and 1 deletions

9
wit.go
View File

@ -10,8 +10,15 @@ import (
var VERSION string
var BUILDTIME string
func (m *Machine) IsInstalled(name string) bool {
return false
}
// read the package list file from mirrors.wit.com
func (m *Machine) initWit() error {
func (m *Machine) InitWit() error {
if m.Wit == nil {
m.Wit = new(Packages)
}
err := m.scanPackageListFile("/var/lib/apt/lists/mirrors.wit.com_wit_dists_sid_main_binary-amd64_Packages")
return err
/*