chore(gonf): fix errcheck and shadow errors
This commit is contained in:
parent
72be13c3e9
commit
8b9195e3e3
15 changed files with 65 additions and 80 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue