project

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package project provides utilities for finding project directories.

Index

Constants

View Source
const (
	// MaxDirSearchDepth limits how many parent directories to search
	// to prevent infinite loops and excessive filesystem traversal
	MaxDirSearchDepth = 10
)

Variables

This section is empty.

Functions

func FindDir

func FindDir(subdir string) string

FindDir searches for a .hex subdirectory by walking up the directory tree from the current working directory. Returns the full path to the found subdirectory or an empty string if not found within MaxDirSearchDepth levels.

Example: If cwd is /home/user/projects/myapp/src and .hex/skills exists at /home/user/projects/myapp/.hex/skills, calling FindDir("skills") returns "/home/user/projects/myapp/.hex/skills"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL