Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package cli implements the murmur command line.

The surface is built on github.com/urfave/cli/v3, which owns flag parsing, the command tree and help rendering. Main owns the process exit code, because the codes are a documented contract and a package that calls os.Exit cannot be tested: urfave/cli's default exit handling is replaced in command() with a no-op handler and the returned error is mapped to a code here instead. Two commitments shape the surface, and both are in:

  • stdout carries data, stderr carries prose. The version string is data; a received payload is data, written as the bytes themselves, which is what makes `murmur decode > go.mod` a transfer rather than a parsing exercise. Help, tables, warnings and errors are prose.
  • Every command that cannot yet do its job says so precisely, names the milestone that will implement it, and points at a command that does work. A scaffold that pretends to succeed is worse than one that refuses.

Index

Constants

View Source
const Version = "0.1.0-scaffold"

Version is the build version.

Variables

This section is empty.

Functions

func Main

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

Main runs the CLI and returns a process exit code.

Types

type App

type App struct {
	Stdout io.Writer
	Stderr io.Writer
	Stdin  io.Reader

	// Global flags, resolved from the command tree before any command action
	// runs. Keeping the resolved values here rather than reading them from the
	// command in every action means the policy helpers below (peakDBFS, schemes)
	// have no dependency on the CLI library at all.
	Loudness string
	Profile  string
	Verbose  bool
}

App holds the resolved global configuration and output streams.

Jump to

Keyboard shortcuts

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