cli

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cli defines the public m2h command-line contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCheckFailure added in v0.15.0

func IsCheckFailure(err error) bool

IsCheckFailure reports whether err represents a completed check whose diagnostics require a non-zero process exit. The report already contains the details, so the process entrypoint must not print this internal signal.

Types

type Command added in v0.20.0

type Command struct {
	// contains filtered or unexported fields
}

Command validates m2h's argument syntax before invoking the CLI parser.

func New

func New(buildVersion string, ui fs.FS, stdout, stderr io.Writer) (*Command, error)

New constructs the root command after validating the injected build version.

func (*Command) Run added in v0.20.0

func (command *Command) Run(ctx context.Context, args []string) error

Run accepts arguments including the executable name, as in os.Args.

Jump to

Keyboard shortcuts

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