kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool

This commit is contained in:
2025-06-22 00:37:47 +03:00
parent c2df2abc78
commit 4142a9db61
830 changed files with 874 additions and 2047 deletions

30
internal/files/main.go Normal file
View File

@@ -0,0 +1,30 @@
package files
import (
"kube-forge/internal/logging"
"os"
)
func GetWorkingDir() string {
cwd, err := os.Getwd()
if err != nil {
logging.Log.Fatal(err)
}
return cwd
}
func CreateTempDir() string {
tempDir, err := os.MkdirTemp("", "kube-forge-")
if err != nil {
logging.Log.Fatal(err)
}
return tempDir
}
func CreateDirWithAllParents(directory string) {
err := os.MkdirAll(directory, 0755)
if err != nil {
logging.Log.Fatal(err)
}
}