chore(gonf): fix errcheck and shadow errors

This commit is contained in:
Julien Dessaux 2024-05-01 16:23:08 +02:00
parent 72be13c3e9
commit 8b9195e3e3
Signed by: adyxax
GPG key ID: F92E51B86E07177E
15 changed files with 65 additions and 80 deletions

View file

@ -8,7 +8,7 @@ import (
)
func Promise() {
gonf.SetServiceFunction(systemd_service)
gonf.SetServiceFunction(systemdService)
}
func isEnabled(name string) bool {
@ -33,7 +33,7 @@ func systemctlShow(name, field string) string {
return string(out[:len(out)-1]) // remove trailing '\n' and convert to string
}
func systemd_service(name, state string) (gonf.Status, error) {
func systemdService(name, state string) (gonf.Status, error) {
switch state {
case "disabled":
if isEnabled(name) {