cli

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package cli is the mockzilla-codegen command line, for its own binary and for programs that run it as one of their commands. It is the only place that prints.

Index

Constants

View Source
const (
	ExitOK    = 0
	ExitFail  = 1
	ExitUsage = 2
)

Exit codes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// Name is what usage and messages call the program, mockzilla-codegen when empty.
	Name   string
	Stdout io.Writer
	Stderr io.Writer
}

Command is the command line. It writes to Stdout and Stderr only.

func (*Command) Run

func (c *Command) Run(ctx context.Context, args []string) int

Run runs the command line with args, the program name left out, and returns the exit code.

Jump to

Keyboard shortcuts

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