Top 4.2% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org
Top 1.3% docker downloads on proxy.golang.org
proxy.golang.org : github.com/trzsz/go-arg
Package arg parses command line arguments using the fields from a struct. For example, defines two command line arguments, which can be set using any of The fastest way to see how to use go-arg is to read the examples below. Fields can be bool, string, any float type, or any signed or unsigned integer type. They can also be slices of any of the above, or slices of pointers to any of the above. Tags can be specified using the `arg` and `help` tag names: Any tag string that starts with a single hyphen is the short form for an argument (e.g. `./example -d`), and any tag string that starts with two hyphens is the long form for the argument (instead of the field name). Other valid tag strings are `positional` and `required`. Fields can be excluded from processing with `arg:"-"`. This example demonstrates basic usage This example demonstrates arguments that have default values This example shows the error string generated by go-arg when an invalid option is provided This example shows the error string generated by go-arg when an invalid option is provided This example shows the usage string generated by go-arg with customized placeholders This example shows the usage string generated by go-arg This example shows the usage string generated by go-arg when using subcommands This example shows the usage string generated by go-arg when using subcommands This example demonstrates arguments with keys and values separated by commas This example demonstrates arguments with keys and values This eample demonstrates multiple value arguments that can be mixed with other arguments. This example demonstrates arguments that have multiple values This example demonstrates positional arguments This example demonstrates arguments that are required This example demonstrates use of subcommands This example shows how to print help for an explicit subcommand This example shows how to print help for a subcommand that is nested several levels deep
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/trzsz/go-arg
License: BSD-2-Clause
Latest release: 9 months ago
First release: over 6 years ago
Namespace: github.com/trzsz
Dependent packages: 2
Dependent repositories: 2
Stars: 1 on GitHub
Forks: 0 on GitHub
Docker dependents: 2
Docker downloads: 320
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/trzsz
Last synced: 1 day ago