cli

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package cli implements the focus command-line interface.

Run is the in-process entry point: it accepts argv (without the program name), an stdout writer, and an stderr writer, and returns the process exit code. main.go is a thin shim that calls Run with os.Args[1:] and os.Stdout/os.Stderr.

This shape lets the entire CLI be exercised from go test without exec'ing a subprocess. Each handler in this package follows the pattern: parse flags, call internal/board, format output. No business logic lives here — that's all in internal/board.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the focus binary version. Stamped at build time via goreleaser; defaults to "dev" for source builds.

Functions

func Run

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

Run executes the focus CLI. It returns the process exit code.

Exit codes:

0 — success
1 — runtime error (board op failed, file IO, etc.)
2 — usage error (unknown command, missing args, bad flag)

Types

This section is empty.

Jump to

Keyboard shortcuts

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