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

getopts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package getopts implements the `getopts` shell built-in. A faithful port requires per-loop persistent state (OPTIND, OPTARG), which the registered version cannot mutate in the runner's vars. We implement a single-shot stub that ALWAYS reports "no more options" (exit 1) and exits silently. mvdan/sh's native `getopts` is the real implementation; /bin/getopts here is for surface completeness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() command.Command

New returns the getopts command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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