1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Source: golang-github-tdewolff-argp
Section: golang
Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Uploaders: Anthony Fok <foka@debian.org>
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 13),
dh-sequence-golang,
golang-any,
golang-github-go-sql-driver-mysql-dev (>= 1.7.1),
golang-github-jmoiron-sqlx-dev (>= 1.3.5),
golang-github-pelletier-go-toml-dev (>= 1.9.5),
golang-github-tdewolff-test-dev (>= 1.0.6)
Testsuite: autopkgtest-pkg-go
Standards-Version: 4.7.0
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-tdewolff-argp
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-tdewolff-argp.git
Homepage: https://github.com/tdewolff/argp
XS-Go-Import-Path: github.com/tdewolff/argp
Package: golang-github-tdewolff-argp-dev
Architecture: all
Multi-Arch: foreign
Depends: golang-github-go-sql-driver-mysql-dev (>= 1.7.1),
golang-github-jmoiron-sqlx-dev (>= 1.3.5),
golang-github-pelletier-go-toml-dev (>= 1.9.5),
${misc:Depends}
Description: GNU command line argument parser (Go library)
The argp Go package provides a command-line argument parser
following the GNU standard.
.
./test -vo out.png --size 256 input.txt
.
with the following features:
.
* build-in help (-h and --help) message
* scan arguments into struct fields with configuration in tags
* scan into composite field types (arrays, slices, structs)
* allow for nested sub commands
.
GNU command line argument rules:
.
* arguments are options when they begin with a hyphen -
* multiple options can be combined: -abc is the same as -a -b -c
* long options start with two hyphens: --abc is one option
* option names are alphanumeric characters
* options can have a value: -a 1 means that a has value 1
* option values can be separated by a space, equal sign, or nothing: -a1 -
a=1 -a 1 are all equal
* options and non-options can be interleaved
* the argument -- terminates all options so that all following arguments
are treated as non-options
* a single - argument is a non-option usually used to mean standard in or
out streams
* options may be specified multiple times, only the last one determines
its value
* options can have multiple values: -a 1 2 3 means that a is an
array/slice/struct of three numbers of value [1,2,3]
.
See also github.com/tdewolff/prompt for a command-line prompter.
|