cmd

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

config.go — the `taskmgr config` command tree: read and write the scalar keys of a configuration file. The `use:` list of hook packages is a list, not a scalar, and belongs to `taskmgr package` (pkg.go).

Two files are addressable. Without --global the target is the resolved store's config.yaml (TASK-STORAGE-SPEC §4.2); with it, the per-user config.yaml (CONFIG-SPEC §2), which resolves no store and therefore works anywhere.

Every write goes through the SDK (Store.UpdateConfig / tasks.UpdateGlobalConfig), which re-reads the file under its lock and applies the edit there, so two concurrent invocations cannot discard each other's work.

pkg.go — `taskmgr package` and `taskmgr hook list`: the surface for hook packages (CLI-SPEC §2.3).

Three commands, one of which writes. A package itself is authored by hand — it is a directory with one owner, so there is nothing for taskmgr to mediate. What needs a command is the `use:` list, which lives in a shared, lock-protected config file, and the merged chain, which neither config file shows on its own.

pkgrepo.go — `taskmgr package repo`: installing package repositories (CLI-SPEC §2.3).

A package repository is a git repository whose top-level directories are hook packages. Cloning it *is* installing it: there is no copy step and no archive to extract, so the only thing taskmgr adds over `git clone` is knowing where the clone belongs and what it provides.

git is spawned here and nowhere else. The SDK's contract stays "a directory that exists on disk", so nothing on the hook path — the resolution a create or a close performs — has any notion of a network, a URL or a revision (HOOK-SPEC §3.5).

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Build info, overridable via -ldflags.

Functions

func Execute

func Execute()

Execute runs taskmgr as a process: one invocation, then exit.

It is a wrapper over Run so that owning os.Exit and owning the command logic are two different things. Everything worth testing is in Run.

func Run added in v0.9.0

func Run(args []string, stdoutW, stderrW io.Writer) int

Run executes one taskmgr invocation with the given arguments, writing everything the command emits to stdoutW and stderrW — log records included — and returns the exit code the process would use: 0 on success, 1 on any failure. A nil args is the empty argument list, not the process's own.

This is the entry point tests use. Asserting on output previously meant `go build` plus a fork, which is why 120 of the CLI's 121 tests sat behind the integration tag and its pure helpers had no tests at all.

Run is NOT safe for concurrent use within one process: the command tree and the output writers are package-level state, reset per invocation rather than rebuilt. Sequential calls are independent — every flag returns to its default and the writers are restored — but two Runs at once would interleave. Do not call t.Parallel in a test that uses it.

Types

This section is empty.

Directories

Path Synopsis
Command taskmgr is the command-line front-end for a file-based task tracker.
Command taskmgr is the command-line front-end for a file-based task tracker.

Jump to

Keyboard shortcuts

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