Reorganize source tree and build assets

This commit is contained in:
mixeme
2026-06-14 23:40:37 +03:00
parent 414be2dfe9
commit a9d1d9529e
22 changed files with 84 additions and 59 deletions
+35
View File
@@ -0,0 +1,35 @@
package core
import (
"os"
"path/filepath"
)
const (
ConfigFileName = "pysentry.yaml"
JobsFileName = "jobs.yaml"
)
type Paths struct {
AppDir string
ConfigPath string
JobsDir string
JobsPath string
LogsDir string
}
func ResolvePaths() (Paths, error) {
executable, err := os.Executable()
if err != nil {
return Paths{}, err
}
appDir := filepath.Dir(executable)
configPath := filepath.Join(appDir, ConfigFileName)
return Paths{
AppDir: appDir,
ConfigPath: configPath,
JobsDir: appDir,
JobsPath: filepath.Join(appDir, JobsFileName),
}, nil
}