module
Version:
v0.0.0-...-04f0340
Opens a new window with list of versions in this module.
Published: Apr 20, 2020
License: MIT
Opens a new window with license information.
README
¶
getopt-golang

getopt-golang is a library for command-line argument processing. It is a conversion of GetOpt.PHP.
https://github.com/getopt-php/getopt-php
Features
- Supports both short (eg.
-v
) and long (eg. --version
) options
- Option aliasing, ie. an option can have both a long and a short version
- Cumulative short options (eg.
-vvv
)
- Two alternative notations for long options with arguments:
--option value
and --option=value
- Collapsed short options (eg.
-abc
instead of -a -b -c
), also with an argument for the last option
(eg. -ab 1
instead of -a -b 1
)
- Two alternative notations for short options with arguments:
-o value
and -ovalue
- Quoted arguments (eg.
--path "/some path/with spcaces"
) for string processing
- Options with multiple arguments (eg.
--domain example.org --domain example.com
)
- Operand (positional arguments) specification, validation and limitation
- Command routing with specified options and operands
- Help text generation
- Default argument values
- Argument validation
License
GetOpt-Golang is published under the MIT License.
Directories
¶
|
|
|
|
|
|
errors
Package errors implements functions to manipulate errors.
|
Package errors implements functions to manipulate errors. |
|
|
Click to show internal directories.
Click to hide internal directories.