chore: rename artifacts

This commit is contained in:
DaanSelen
2026-03-30 13:37:18 +02:00
parent 1ae2620e7e
commit d5844bf28a
2 changed files with 27 additions and 9 deletions
+23 -5
View File
@@ -1,14 +1,32 @@
package setup
import "os"
import (
"log"
"os"
)
func PrepareEnvironment() (bool, error) {
if _, err := os.Stat("./bin"); err != nil {
return false, err
ok, err := fsCheck()
return ok, err
}
func fsCheck() (bool, error) {
dirs := []string{"./bin", "./books", "./history"}
files := []string{"./api.conf", "./os_categories.json"}
for _, d := range dirs {
if _, err := os.Stat(d); err != nil {
log.Printf("Unable to stat dir: %s", d)
return false, err
}
}
if _, err := os.Stat("./books"); err != nil {
return false, err
for _, f := range files {
if _, err := os.Stat(f); err != nil {
log.Printf("Unable to stat file: %s", f)
return false, err
}
}
return true, nil