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

@ -6,15 +6,12 @@ import (
"os/exec"
)
// ----- Globals ---------------------------------------------------------------
var commands []*CommandPromise
// ----- Init ------------------------------------------------------------------
func init() {
commands = make([]*CommandPromise, 0)
}
// ----- Public ----------------------------------------------------------------
func Command(cmd string, args ...string) *CommandPromise {
return CommandWithEnv([]string{}, cmd, args...)
}
@ -81,7 +78,6 @@ func (c CommandPromise) Status() Status {
return c.status
}
// ----- Internal --------------------------------------------------------------
func resolveCommands() (status Status) {
status = KEPT
for _, c := range commands {