INNER CODE UNIT · Go

func

g3n/g3nd · app/app.go:227

func (a *App) checkDirData(dirDataName string) string {

	// Check first if data directory is in the current directory
	if _, err := os.Stat(dirDataName); err == nil {
		dirData, err := filepath.Abs(dirDataName)
		if err != nil {
			panic(err)
		}
		return dirData
	}

	// Get the executable path
	execPath, err := osext.Executable()
	if err != nil {
		panic(err)
	}

	// Checks if data directory is in the executable directory

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…