mirror of
https://github.com/khairul169/vaulterm.git
synced 2026-09-15 17:03:30 +07:00
feat: add group
This commit is contained in:
@@ -9,16 +9,18 @@ import (
|
||||
)
|
||||
|
||||
func GetDataPath(resolveFile string) string {
|
||||
dataDir := os.Getenv("DATA_DIR")
|
||||
if dataDir != "" {
|
||||
return filepath.Join(dataDir, resolveFile)
|
||||
}
|
||||
|
||||
// Resolve the app directory
|
||||
execPath, err := os.Executable()
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
appDir := filepath.Dir(execPath)
|
||||
if resolveFile == "" {
|
||||
return appDir
|
||||
}
|
||||
return filepath.Join(appDir, resolveFile)
|
||||
|
||||
return filepath.Join(cwd, resolveFile)
|
||||
}
|
||||
|
||||
func CheckAndCreateEnvFile() error {
|
||||
|
||||
Reference in New Issue
Block a user