Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.8% on proxy.golang.org
Top 0.3% dependent packages on proxy.golang.org
Top 0.3% dependent repos on proxy.golang.org
Top 1.5% docker downloads on proxy.golang.org

proxy.golang.org : github.com/anacrolix/tagflag

Package tagflag uses reflection to derive flags and positional arguments to a program, and parses and sets them from a slice of arguments. For example: Supported tags include: MarshalArgs is called on fields that implement ArgsMarshaler. A number of arguments matching the arity of the field are passed if possible. Slices will collect successive values, within the provided arity constraints. A few helpful types have builtin marshallers, for example Bytes, *net.TCPAddr, *url.URL, time.Duration, and net.IP. Flags are strictly passed with the form -K or -K=V. No space between -K and the value is allowed. This allows positional arguments to be mixed in with flags, and prevents any confusion due to some flags occasionally not taking values. A `--` will terminate flag parsing, and treat all further arguments as positional. A builtin help and usage printer are provided, and activated when passing -h or -help. Flag and positional argument names are automatically munged to fit the standard scheme within tagflag.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/anacrolix/tagflag
Keywords: argument-parsing, cli, go, struct
License: MIT
Latest release: about 1 year ago
First release: almost 6 years ago
Namespace: github.com/anacrolix
Dependent packages: 206
Dependent repositories: 530
Stars: 8 on GitHub
Forks: 2 on GitHub
Docker dependents: 2
Docker downloads: 780
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/anacrolix
Last synced: 26 days ago

    Loading...
    Readme
    Loading...