Documentation
¶
Overview ¶
Package argv implements a simple GNU-style command-line argument parser.
There are several other packages providing similar functionality, but most of them require a setup phase where a specification for the expected arguments is provided. In contrast, argv simply goes through a list of command-line arguments and classifies them as either positional arguments, flags or option-value pairs.
Simply do:
parsed := New(os.Args[1:]).Parse()
This simplicity has some limitations, for example not knowing whether an argument is a boolean flag or a list of strings before parsing leads to unexpected results. However, this can still be used to quickly parse and process a very simple list of arguments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.