summaryrefslogtreecommitdiff
path: root/apt.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-18 09:41:08 -0600
committerJeff Carr <[email protected]>2024-11-18 09:41:08 -0600
commitb71fec22c8cc6c5b3be47bd782a7c807be75216c (patch)
tree61194783bc2c839eef5a7566b8eaccc014be078b /apt.go
parent769c9757b7065dc7bde4543a5347e31606875ff2 (diff)
keep working towards update workingv0.0.6
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'apt.go')
-rw-r--r--apt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt.go b/apt.go
index de38135..5fa6385 100644
--- a/apt.go
+++ b/apt.go
@@ -28,7 +28,7 @@ func initPackages() {
}
}
- log.Info(me.hostname, "has distro", me.distro, "with", me.machine.Packages.Len(), "packages installed")
+ log.Info(me.hostname, "has distro", me.distro, "with", me.machine.Packages.Len(), "packages installed.")
}
func addNew(name string, version string) bool {
@@ -38,12 +38,12 @@ func addNew(name string, version string) bool {
return me.machine.Packages.Append(new1)
}
-func updatePackages() {
+func updatePackages() string {
// Get the list of installed packages for the detected distro
newP, err := getPackageList(me.distro)
if err != nil {
fmt.Println("Error:", err)
- return
+ return fmt.Sprintln("getPackageList()", err)
}
var newCounter, changeCounter int
@@ -69,5 +69,5 @@ func updatePackages() {
if newCounter != 0 {
footer += fmt.Sprintf(" (%d new)", newCounter)
}
- log.Info(footer)
+ return footer
}