github.com/spf13/pflag
go
pkg:golang/github.com/spf13/pflag
3,511 Dependabot PRs
about 3 hours ago
1,347 repositories
33 repositories
Recent PRs
chore(deps): bump the cli-tools group with 5 updates
build(deps): bump the dependencies group across 1 directory with 7 updates
nektos/act #5963
Bump the gomod group across 1 directory with 17 updates
stolostron/governance-policy-addon-controller #1077
Bump the gomod group across 1 directory with 18 updates
stolostron/governance-policy-addon-controller #1076
Bump the gomod group across 1 directory with 19 updates
stolostron/governance-policy-addon-controller #1074
Bump the gomod group with 18 updates
open-cluster-management-io/governance-policy-addon-controller #224
build(deps): Bump github.com/spf13/pflag from 1.0.6 to 1.0.10 in /x/upgrade
bwhour/cosdk #2738
Bump the gomod group across 1 directory with 41 updates
stolostron/config-policy-controller #1535
Bump the gomod group across 1 directory with 36 updates
stolostron/governance-policy-framework-addon #889
Bump the gomod group across 1 directory with 56 updates
open-cluster-management-io/governance-policy-propagator #272
Bump the gomod group across 1 directory with 57 updates
open-cluster-management-io/governance-policy-propagator #271
Bump the gomod group across 1 directory with 47 updates
open-cluster-management-io/governance-policy-framework-addon #181
Bump the gomod group with 54 updates
stolostron/governance-policy-propagator #1177
Bump the gomod group with 64 updates
stolostron/governance-policy-addon-controller #1054
Bump the gomod group with 54 updates
open-cluster-management-io/config-policy-controller #393
chore(deps): bump github.com/spf13/pflag from 1.0.6 to 1.0.10
stackrox/infra #1681
chore(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.10
stbenjam/ai-helpers-metrics-server #7
build(deps): bump github.com/spf13/pflag from 1.0.3 to 1.0.10 in /recorderproxy
NationalLibraryOfNorway/veidemann #59
build(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /metrics
NationalLibraryOfNorway/veidemann #54
Bump github.com/spf13/pflag from 1.0.6 to 1.0.10 in /client/v2
build(deps): Bump github.com/spf13/pflag from 1.0.6 to 1.0.10 in /client/v2
bwhour/cosdk #2731
:seedling:(deps): Bump the all-go-mod-patch-and-minor group across 2 directories with 11 updates
Mirantis/cluster-api-provider-openstack #28
chore(deps): bump the minor-and-patch group across 1 directory with 69 updates
Bump the go-dependencies group across 1 directory with 4 updates
ironcore-dev/ceph-provider #795
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
kevineaton/art #14
Bump the gomod group across 1 directory with 7 updates
scylladb/local-csi-driver #109
chore(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10 in the spf13 group
gofiber/cli #213
chore(deps): Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
chore(deps): Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
chore(deps): Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
Bump the go-deps group across 1 directory with 3 updates
fluxcd/helm-controller #1328
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
paulscherrerinstitute/scicat-cli #152
Bump github.com/spf13/pflag from 1.0.9 to 1.0.10
ultravioletrs/cocos #533
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
Bump the third-party group across 1 directory with 19 updates
openziti/ziti #3313
Bump the all group with 4 updates
cert-manager/example-approver-policy-plugin #12
build(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /tools
lmorett1/asynq #10
Bump the all group with 6 updates
cert-manager/example-approver-policy-plugin #7
build(deps): bump the dependabot group across 1 directory with 14 updates
ohsu-comp-bio/funnel #1246
vendor: bump github.com/spf13/pflag from 1.0.5 to 1.0.10
shriroopjoshi/azure-container-networking #251
Bump the third-party group across 1 directory with 18 updates
openziti/ziti #3306
build(deps): bump the all-updates group with 9 updates
caddyserver/caddy #7285
chore(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
:arrow_up: Bump github.com/spf13/pflag from 1.0.7 to 1.0.10
gardener/etcd-druid #1179
Bump the go-deps group with 2 updates
fluxcd/image-reflector-controller #835
build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
vatesfr/xenorchestra-cloud-controller-manager #25
Package Details
| Name: | github.com/spf13/pflag |
| Ecosystem: | go |
| PURL Type: | golang |
| Package URL: | pkg:golang/github.com/spf13/pflag |
| JSON API: | View JSON |
Package Information
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. pflag is compatible with the GNU extensions to the POSIX recommendations for command-line options. See http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html Usage: pflag is a drop-in replacement of Go's native flag package. If you import pflag under the name "flag" then all code should continue to function with no changes. There is one exception to this: if you directly instantiate the Flag struct there is one more field "Shorthand" that you will need to set. Most code never instantiates this struct directly, and instead uses functions such as String(), BoolVar(), and Var(), and is therefore unaffected. Define flags using flag.String(), Bool(), Int(), etc. This declares an integer flag, -flagname, stored in the pointer ip, with type *int. If you like, you can bind the flag to a variable using the Var() functions. Or you can create custom flags that satisfy the Value interface (with pointer receivers) and couple them to flag parsing by For such flags, the default value is just the initial value of the variable. After all flags are defined, call to parse the command line into the defined flags. Flags may then be used directly. If you're using the flags themselves, they are all pointers; if you bind to variables, they're values. After parsing, the arguments after the flag are available as the slice flag.Args() or individually as flag.Arg(i). The arguments are indexed from 0 through flag.NArg()-1. The pflag package also defines some new functions that are not in flag, that give one-letter shorthands for flags. You can use these by appending 'P' to the name of any function that defines a flag. Shorthand letters can be used with single dashes on the command line. Boolean shorthand flags can be combined with other shorthand flags. Command line flag syntax: Unlike the flag package, a single dash before an option means something different than a double dash. Single dashes signify a series of shorthand letters for flags. All but the last shorthand letter must be boolean flags. Flag parsing stops after the terminator "--". Unlike the flag package, flags can be interspersed with arguments anywhere on the command line before this terminator. Integer flags accept 1234, 0664, 0x1234 and may be negative. Boolean flags (in their long form) accept 1, 0, t, f, true, false, TRUE, FALSE, True, False. Duration flags accept any input valid for time.ParseDuration. The default set of command-line flags is controlled by top-level functions. The FlagSet type allows one to define independent sets of flags, such as to implement subcommands in a command-line interface. The methods of FlagSet are analogous to the top-level functions for the command-line flag set.
| Repository: | https://github.com/spf13/pflag |
| Homepage: | https://github.com/spf13/pflag |
| Latest Release: |
v1.0.6
10 months ago |
| Dependent Repos: | 140,663 |
| Dependent Packages: | 57,644 |
| Ranking: | Top 0.0047% by dependent repos Top 0.0017% by dependent pkgs |