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

cli

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Overview

Package cli implements the lfm command line: argument handling, the commands and how their results read in a terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, env Env, args []string) int

Run executes args and returns the process exit code: 0 success, 1 failure, 2 a mistake in the command line, 130 interrupted.

Types

type Build

type Build struct{ Version, Commit, Date string }

Build identifies the binary.

type Env

type Env struct {
	Stdout, Stderr io.Writer
	Build          Build
	Getenv         func(string) string // os.Getenv when nil
	Home           string              // the user's home directory; os.UserHomeDir when empty
}

Env is everything a command touches outside the file system.

Jump to

Keyboard shortcuts

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