summaryrefslogtreecommitdiff
path: root/stdlib/os/debian/apt.go
diff options
context:
space:
mode:
authorJulien Dessaux2024-05-01 16:23:08 +0200
committerJulien Dessaux2024-05-01 16:23:08 +0200
commit8b9195e3e3506d576b39a23ca646c260dfacc808 (patch)
tree1cdbdd2fb368654ef8eab702258eb5d6a90e1447 /stdlib/os/debian/apt.go
parentchore(gonf): fix go vet and staticcheck errors (diff)
downloadgonf-8b9195e3e3506d576b39a23ca646c260dfacc808.tar.gz
gonf-8b9195e3e3506d576b39a23ca646c260dfacc808.tar.bz2
gonf-8b9195e3e3506d576b39a23ca646c260dfacc808.zip
chore(gonf): fix errcheck and shadow errors
Diffstat (limited to '')
-rw-r--r--stdlib/os/debian/apt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/os/debian/apt.go b/stdlib/os/debian/apt.go
index 3386f20..3b72b9f 100644
--- a/stdlib/os/debian/apt.go
+++ b/stdlib/os/debian/apt.go
@@ -14,10 +14,10 @@ import (
var packages map[string]string
func init() {
- packages_list()
+ packagesList()
}
-func packages_install(names []string) (gonf.Status, []string) {
+func packagesInstall(names []string) (gonf.Status, []string) {
gonf.FilterSlice(&names, func(n string) bool {
_, ok := packages[n]
return !ok
@@ -28,11 +28,11 @@ func packages_install(names []string) (gonf.Status, []string) {
args := append([]string{"install", "-y", "--no-install-recommends"}, names...)
cmd := gonf.CommandWithEnv([]string{"DEBIAN_FRONTEND=noninteractive", "LC_ALL=C"}, "apt-get", args...)
cmd.Resolve()
- packages_list()
+ packagesList()
return cmd.Status(), names
}
-func packages_list() {
+func packagesList() {
packages = make(map[string]string)
ecmd := exec.Command("dpkg-query", "-W")
out, err := ecmd.CombinedOutput()