paths

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package paths contains path resolution utilities used by the CLI.

The main entry point is ResolveTasksDir, which determines the directory to store and read tasks from in a way that works locally and inside containers. It supports absolute paths, relative paths resolved from the current working directory, upward ancestor search, optional anchoring to the git repository root, and a sensible fallback to the current working directory when no git repository is present.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveTasksDir

func ResolveTasksDir(fs afero.Fs, dir string) (string, error)

ResolveTasksDir determines the directory to use for tasks based on the provided input path and the current execution context (local or container).

Strategy:

  1. Absolute path => return as-is.
  2. Relative path: a) If exists from CWD => return it. b) Walk up parents; if <ancestor>/<dir> exists => return it. c) If in a git repo => use <gitRoot>/<dir>. d) Fallback to <CWD>/<dir> (will be created on demand by the store).

Types

This section is empty.

Jump to

Keyboard shortcuts

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