gnuflags

package
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

standard command line flags based on GNU standards.

POSIX

Reference: https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html

Index

Constants

View Source
const (
	GNU_LONG_OPTION_SPEC_URL = `https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table`
)

Variables

View Source
var (

	// It is a good idea to follow the POSIX guidelines for the command-line options of a program. The easiest way to do this is to use getopt to parse them. Note that the GNU version of getopt will normally permit options anywhere among the arguments unless the special argument ‘--’ is used. This is not what POSIX specifies; it is a GNU extension.
	UseDoubleDash = true
)

Functions

func Example

func Example()

func GetOpt

func GetOpt()

func GetOptLong

func GetOptLong() (string, error)

GetOptLong returns the long long option names for flags.

Please define long-named options that are equivalent to the single-letter Unix-style options. We hope to make GNU more user friendly this way. This is easy to do with the GNU function getopt_long.

One of the advantages of long-named options is that they can be consistent from program to program. For example, users should be able to expect the “verbose” option of any GNU program which has one, to be spelled precisely ‘--verbose’. To achieve this uniformity, look at the table of common long-option names when you choose the option names for your program (see Option Table).

Options Table: https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table

Types

This section is empty.

Jump to

Keyboard shortcuts

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