summaryrefslogtreecommitdiff
path: root/stdlib/os/debian/debian.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/debian.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 'stdlib/os/debian/debian.go')
-rw-r--r--stdlib/os/debian/debian.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/os/debian/debian.go b/stdlib/os/debian/debian.go
index 9954088..95af85d 100644
--- a/stdlib/os/debian/debian.go
+++ b/stdlib/os/debian/debian.go
@@ -2,21 +2,22 @@ package debian
import (
_ "embed"
- "git.adyxax.org/adyxax/gonf/v2/pkg"
+
+ gonf "git.adyxax.org/adyxax/gonf/v2/pkg"
"git.adyxax.org/adyxax/gonf/v2/stdlib/os/linux"
"git.adyxax.org/adyxax/gonf/v2/stdlib/os/systemd"
)
//go:embed apt-norecommends
-var apt_norecommends []byte
+var aptNoRecommends []byte
//go:embed sources.list
-var sources_list []byte
+var sourcesList []byte
func Promise() {
// ----- gonf --------------------------------------------------------------
- apt_update := gonf.Command("apt-get", "update", "-qq")
- gonf.SetPackagesConfiguration(packages_install, apt_update)
+ aptUpdate := gonf.Command("apt-get", "update", "-qq")
+ gonf.SetPackagesConfiguration(packagesInstall, aptUpdate)
gonf.SetUsersConfiguration(linux.Useradd)
// ----- systemd -----------------------------------------------------------
systemd.Promise()
@@ -27,12 +28,12 @@ func Promise() {
gonf.AppendVariable("debian-extra-sources", "# Extra sources")
gonf.File("/etc/apt/sources.list").
Permissions(rootRO).
- Template(sources_list).
+ Template(sourcesList).
Promise().
- IfRepaired(apt_update)
+ IfRepaired(aptUpdate)
gonf.File("/etc/apt/apt.conf.d/99_norecommends").
DirectoriesPermissions(rootDir).
Permissions(rootRO).
- Contents(apt_norecommends).
+ Contents(aptNoRecommends).
Promise()
}