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

proxy.golang.org : github.com/pborman/flags

Package flags is a simplified version github.com/pborman/options that works with the standard flag package and possibly other flag packages. Package flags provides a structured interface for flag parsing. It is particularly helpful for parsing an option set more than once and possibly concurrently. This package was designed to make option specification simpler and more concise. It is a wrapper around the the standard flag pacakge. Options are declared in a structure that contains all information needed for the options. Each exported field of the structure represents an option. The fields tag is used to provide additional details. The tag contains up to four pieces of information: The syntax of a tag is: The option must come first in the tag. It is prefixed by "-" or "--". The parameter name is specified by appending =PARAM to one of the declared options (e.g., --option=VALUE). The description is everything following the option declaration(s). The options and description message are delimited by one or more white space characters. An empty option (- or --) terminates option declarations, everything following is the description. This enables the description to start with a -, e.g. "-v -- -v means verbose". The following are example tags A tag of just "-" causes the field to be ignored an not used as an option. An empty tag or missing tag causes the tag to be auto-generated. The fields of the structure must be compatible with one of the folllowing types: The following structure declares 7 options and sets the default value of Count to be 42. The following are various ways to use the above declaration.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/pborman/flags
License: Apache-2.0
Latest release: over 1 year ago
First release: over 1 year ago
Namespace: github.com/pborman
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 9 days ago

    Loading...
    Readme
    Loading...