runner

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package runner centralizes the tiny CLI boilerplate shared by every helpers/* generator main: validate the positional-argument count, print a usage line, and exit non-zero on misuse (QG-030). It deliberately does NOT abstract the generation step itself — the helpers differ too much (different arg arities and input sources) for a single Generator interface to be clearer than the explicit per-helper code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Require

func Require(minArgs, exitCode int, usage string) []string

Require ensures at least minArgs elements are present in os.Args (which includes the program name in os.Args[0]). On shortfall it writes usage to stderr and exits with exitCode. It returns os.Args so callers can index the positional arguments exactly as before.

Types

This section is empty.

Jump to

Keyboard shortcuts

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