Package Usage: go: github.com/pborman/options
Package options provides a structured interface for getopt style 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
github.com/pborman/getopt/v2 package.
Package options also provides a facility to specify command line options in a
text file by using the Flags type (described below).
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 long and/or short options must come first in the tag. 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 can be any type that can be passed to getopt.Flag
as a pointer (e.g., string, []string, int, bool, time.Duration, etc). This
includes any type that implements getopt.Value.
The following structure declares 7 options and sets the default value of
Count to be 42. The --flags option is used to read option values from
a file.
The help message generated from theOptions is:
The following are various ways to use the above declaration.
6 versions
Latest release: about 2 years ago
11 dependent packages
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/pborman/options
View more repository details: http://repos.ecosyste.ms/hosts/GitHub/repositories/pborman%2Foptions
Dependent Repos 5
filecoin-project/go-fil-commp-hashhash
A hash.Hash implementation of fil-commitment-unsealedSize: 77.1 KB - Last synced: 3 months ago - Pushed: 3 months ago


filecoin-project/go-dagaggregator-unixfs
Size: 236 KB - Last synced: 11 months ago - Pushed: about 2 years ago

TanmayPatil105/reduce
⚡ Extremely fast Command line URL shortener using reduced.to APISize: 60.5 KB - Last synced: 2 months ago - Pushed: over 1 year ago

jcace/go-fil-dataprep Fork of anjor/go-fil-dataprep
Size: 6.2 MB - Last synced: about 1 year ago - Pushed: almost 2 years ago

