chore(repo): renamed gonf subfolder to something more traditional in go land

This commit is contained in:
Julien Dessaux 2024-03-07 00:54:35 +01:00
parent 3b9af43738
commit 560becfd32
Signed by: adyxax
GPG key ID: F92E51B86E07177E
14 changed files with 2 additions and 2 deletions

52
pkg/gonf.go Normal file
View file

@ -0,0 +1,52 @@
package gonf
import (
"log/slog"
"os"
)
func EnableDebugLogs() {
h := slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
Level: slog.LevelDebug,
})
slog.SetDefault(slog.New(h))
}
func Resolve() (status Status) {
for {
// ----- Files -------------------------------------------------
status = resolveFiles()
switch status {
case BROKEN:
return BROKEN
case REPAIRED:
continue
}
// ----- Packages ----------------------------------------------
status = resolvePackages()
switch status {
case BROKEN:
return BROKEN
case REPAIRED:
packages_list_function()
continue
}
// ----- Services ----------------------------------------------
status = resolveServices()
switch status {
case BROKEN:
return BROKEN
case REPAIRED:
continue
}
// ----- Commands ----------------------------------------------
status = resolveCommands()
switch status {
case BROKEN:
return BROKEN
case REPAIRED:
continue
}
return
}
}