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

@ -2,18 +2,14 @@ package gonf
import "log/slog"
// ----- Globals ---------------------------------------------------------------
var services []*ServicePromise
// service management function
var serviceFunction func(string, string) (Status, error)
// ----- Init ------------------------------------------------------------------
func init() {
services = make([]*ServicePromise, 0)
}
// ----- Public ----------------------------------------------------------------
func SetServiceFunction(f func(string, string) (Status, error)) {
serviceFunction = f
}
@ -82,7 +78,6 @@ func (s ServicePromise) Status() Status {
return s.status
}
// ----- Internal --------------------------------------------------------------
func resolveServices() (status Status) {
status = KEPT
for _, c := range services {