github.com/spf13/pflag
go
pkg:golang/github.com/spf13/pflag
3,672 Dependabot PRs
6 days ago
1,421 repositories
13 repositories
Recent PRs
:seedling: Bump the all-go-mod-patch-and-minor group across 1 directory with 5 updates
ionos-cloud/cluster-api-provider-ionoscloud #364
fix(deps): bump the external group across 2 directories with 5 updates
opentdf/platform #3487
chore(deps): bump the gomod-minor-and-patch group across 1 directory with 19 updates
speakeasy-api/speakeasy #2038
build(deps): bump the all group across 1 directory with 6 updates
kubernetes-sigs/cloud-provider-azure #10317
deps: bump the go-dependencies group with 2 updates
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
nikimanoledaki/eksctl #1510
Bump the github-dependencies group with 44 updates
kubernetes-csi/external-health-monitor #358
build(deps): Bump github.com/spf13/pflag from 1.0.6 to 1.0.10 in /client/v2
Do-Chain/dochain-cosmos-sdk #35
Bump the go-minor-patch group across 1 directory with 4 updates
rwahyudi/gib #1
build(deps): bump the all group with 4 updates
kubernetes-sigs/cloud-provider-azure #10285
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
classicmat123/EKSCTL-Repo #1234
Chore(deps): Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
benchmark-large-codebase/grafana__grafana__lyxor__PR97529__20260504 #39
[release-1.36][gomod]: Bump the patch group across 1 directory with 2 updates
openshift-knative/serverless-operator #4096
build(deps): Bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /simapp
Bump the all-deps group across 5 directories with 166 updates
hyperledger/fabric-private-chaincode #948
Bump the github-dependencies group with 41 updates
kubernetes-csi/external-attacher #715
chore(deps)(deps): bump the go-deps group with 5 updates
build(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10
deps: bump github.com/spf13/pflag from 1.0.9 to 1.0.10
feat(deps): bump the gomod-deps group with 22 updates
openim-sigs/component-base #97
deps: bump the all-go-minor-and-patch group with 33 updates
Azure/azure-container-networking #4349
chore(deps): bump the gomod-minor-and-patch group across 1 directory with 20 updates
speakeasy-api/speakeasy #2021
Bump the go-dependencies group across 1 directory with 12 updates
Bump github.com/spf13/pflag from 1.0.6 to 1.0.10
LX-CodeReview/grafana__grafana__codehawk__PR103633__20260407 #34
go: bump the go group across 5 directories with 11 updates
grass-dev-pa/oasis-sdk-003 #11
go: bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /go
grass-dev-pa/oasis-core-002 #5
go: bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /go
grass-dev-pa/oasis-core-003 #5
chore(deps): bump the gomod-minor-and-patch group across 1 directory with 21 updates
speakeasy-api/speakeasy #2011
build(deps): bump the oc-mirror-v2-version-updates group with 13 updates
openshift/oc-mirror #1382
build(deps): bump the dependencies group across 1 directory with 12 updates
nektos/act #6056
deps: Bump github.com/spf13/pflag from 1.0.9 to 1.0.10
:seedling: Bump the all-go-mod-patch-and-minor group across 1 directory with 5 updates
ionos-cloud/cluster-api-provider-ionoscloud #350
Bump the github-dependencies group with 60 updates
GoogleCloudPlatform/gcs-fuse-csi-driver #1275
Bump the minor-dependencies group across 1 directory with 4 updates
rwx-cloud/rwx #429
chore(deps): Bump github.com/spf13/pflag from 1.0.9 to 1.0.10
deps: bump the all-go-minor-and-patch group with 31 updates
Azure/azure-container-networking #4263
build(deps): bump the all group across 1 directory with 27 updates
kubernetes-sigs/cloud-provider-azure #10042
build(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10
chore(deps): bump the gomod-minor-and-patch group across 1 directory with 21 updates
speakeasy-api/speakeasy #1972
build(deps): bump the all group with 22 updates
kubernetes-sigs/cloud-provider-azure #9995
build(deps): bump the all group across 1 directory with 20 updates
kubernetes-sigs/cloud-provider-azure #9993
chore(deps): bump the gomod-minor-and-patch group across 1 directory with 19 updates
speakeasy-api/speakeasy #1945
build(deps): bump the oc-mirror-v2-version-updates group with 17 updates
openshift/oc-mirror #1362
chore: bump github.com/spf13/pflag from 1.0.9 to 1.0.10
pierskarsenbarg/gh-repo-url #5
deps: bump github.com/spf13/pflag from 1.0.9 to 1.0.10
pavelpascari/sdf #46
build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
[release-1.16][gomod]: Bump the patch group across 1 directory with 7 updates
openshift-knative/kn-plugin-event #1125
build(deps): Bump github.com/spf13/pflag from 1.0.7 to 1.0.10
shizhMSFT/notation #101
deps(deps): bump github.com/spf13/pflag from 1.0.6 to 1.0.10
jakebark/tag-nag #65
[release-1.16][gomod]: Bump the minor group across 1 directory with 7 updates
openshift-knative/kn-plugin-event #1111
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
over 1 year ago |
| Dependent Repos: | 140,663 |
| Dependent Packages: | 57,644 |
| Ranking: | Top 0.0047% by dependent repos Top 0.0017% by dependent pkgs |