cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package cli is the flagnetic command line. Its entry takes everything a process gets from outside (arguments, environment, output streams and signals) as parameters, so tests run every command in-process.

Exit codes: 0 success, 1 a runtime failure, 2 a usage or configuration error, so tooling can tell a bad deploy from a crash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string, lookupEnv func(string) (string, bool), stdout, stderr io.Writer, signals <-chan os.Signal, opts ...Option) int

Main runs the command named by args[0] and returns the process's exit code. lookupEnv reads the environment, as os.LookupEnv does; a value on signals asks the command to stop.

Types

type Option

type Option func(*options)

Option changes what a command reads from the binary or the database, or what it serves.

Jump to

Keyboard shortcuts

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