cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package cli implements the nod command line: argument parsing, help text, output formats and exit codes. The queue itself lives in internal/queue.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the release version, set at build time with -ldflags "-X github.com/8thlyr/nod/internal/cli.Version=v0.1.0".

Functions

func Run

func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int

Run executes nod with args (without the program name) and returns the exit code.

Types

type Env

type Env struct {
	Now    func() time.Time
	Getenv func(string) string
	Getwd  func() (string, error)
}

Env is everything Run takes from the outside world, so tests can pin the clock and the environment.

func (Env) Run

func (e Env) Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int

Run is like the package-level Run but uses e for the clock and environment.

Jump to

Keyboard shortcuts

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