diff options
| -rw-r--r-- | init.go | 4 | ||||
| -rw-r--r-- | old/apt.go | 39 | ||||
| -rw-r--r-- | old/apt_darwin.go | 11 | ||||
| -rw-r--r-- | old/apt_windows.go | 11 |
4 files changed, 2 insertions, 63 deletions
@@ -19,7 +19,7 @@ func (m *zoopb.Machine) SinceLastUpdate() time.Duration { } */ -func InitMachine() (*zoopb.Machine, string) { +func InitMachine() *zoopb.Machine { var fullname string var err error m := new(zoopb.Machine) @@ -35,7 +35,7 @@ func InitMachine() (*zoopb.Machine, string) { InitWitMirrors(m) config.SavePB(m, fullname) - return m, fullname + return m } func InitDaemon() *zoopb.Machine { diff --git a/old/apt.go b/old/apt.go deleted file mode 100644 index 4b9018b..0000000 --- a/old/apt.go +++ /dev/null @@ -1,39 +0,0 @@ -package zoopb - -import ( - "fmt" -) - -// init the installed package list -func initPackages(me *Machine) { - // Get the list of installed packages for the detected distro - newP, err := getPackageList(me.Distro) - if err != nil { - fmt.Println("Error:", err) - return - } - - if me.Packages == nil { - me.Packages = new(Packages) - } - - // Print the installed packages and their versions - for pkg, version := range newP { - new1 := new(Package) - new1.Name = pkg - new1.Version = version - me.Packages.Append(new1) - // log.Info("added", new1.Name, "failed") - } - - me.getMemory() -} - -/* -func (me *Machine) addNew(name string, version string) { - new1 := new(Package) - new1.Name = name - new1.Version = version - me.Packages.Append(new1) -} -*/ diff --git a/old/apt_darwin.go b/old/apt_darwin.go deleted file mode 100644 index 0fc8e0f..0000000 --- a/old/apt_darwin.go +++ /dev/null @@ -1,11 +0,0 @@ -package zoopb - -import ( - "go.wit.com/log" -) - -// getPackageList returns the list of installed packages based on the distro -func getPackageList(distro string) (map[string]string, error) { - log.Info("zoopb: have not done macos yet, skipping okay") - return nil, nil -} diff --git a/old/apt_windows.go b/old/apt_windows.go deleted file mode 100644 index feec104..0000000 --- a/old/apt_windows.go +++ /dev/null @@ -1,11 +0,0 @@ -package zoopb - -import ( - "go.wit.com/log" -) - -// getPackageList returns the list of installed packages based on the distro -func getPackageList(distro string) (map[string]string, error) { - log.Info("zoopb: have not done windows yet, skipping okay") - return nil, nil -} |
