change panic to fatal log

This commit is contained in:
2025-08-10 14:28:32 +03:00
parent 4ede8161f8
commit b6087afc46
10 changed files with 265 additions and 55 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"kube-forge/internal/logging"
"runtime"
"strings"
@@ -22,6 +23,6 @@ func main() {
pipPlatform := platforms[strings.Join([]string{os, arch}, "-")]
err := pip.CreateEmbeddedPipPackages("requirements.txt", os, arch, pipPlatform, "./data/")
if err != nil {
panic(err)
logging.Log.Fatal(err)
}
}

View File

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"kube-forge/internal/logging"
"kube-forge/internal/python/data"
"kube-forge/internal/resources"
"os"
@@ -117,7 +118,7 @@ func NewPythonExec() *PythonExec {
pythonLibFs, err := embed_util.NewEmbeddedFilesWithTmpDir(data.Data, pythonLibDir, true)
if err != nil {
panic(err)
logging.Log.Fatal(err)
}
pythonLibFsPath := pythonLibFs.GetExtractedPath()
resourcesFs, _ := embed_util.NewEmbeddedFilesWithTmpDir(resources.Kubespray, resourcesDir, true)