github.com/spf13/pflag
go
pkg:golang/github.com/spf13/pflag
3,676 Dependabot PRs
4 days ago
1,423 repositories
9 repositories
Recent PRs (filtered by: Patch PRs )
Bump the go-dependencies group with 3 updates
fission/fission #3258
build(deps): Bump the gomod group across 1 directory with 2 updates
chore(deps): bump the cli-tools group with 5 updates
Bump github.com/spf13/pflag from 1.0.5 to 1.0.10
build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
lxc/terraform-provider-incus #317
build(deps): bump the all group with 14 updates
kubernetes-sigs/cloud-provider-azure #9456
build(deps): bump the all group across 1 directory with 3 updates
jackfrancis/cloud-provider-azure #557
chore(deps): bump the gomod-update group across 1 directory with 6 updates
foomo/posh #128
build(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.10 in /tools
Chore(deps): Bump github.com/spf13/pflag from 1.0.9 to 1.0.10
getporter/porter #3450
Bump the dependencies group with 3 updates
mpapenbr/iracelog-graphql #190
Bump github.com/spf13/pflag from 1.0.7 to 1.0.10 in /addon-resizer
kubernetes/autoscaler #8526
Bump the go-deps group across 1 directory with 2 updates
fluxcd/helm-controller #1298
:seedling: Bump github.com/spf13/pflag from 1.0.9 to 1.0.10
metal3-io/ip-address-manager #1144
chore(deps): bump the minor group with 7 updates
sylabs/singularity #3806
chore(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10 in the gomod group
wakeward/gh-branch-auditor #13
chore(deps): bump the patch-updates group across 1 directory with 11 updates
chore(deps): bump the minor group with 7 updates
sylabs/singularity #3804
Bump the security group across 1 directory with 10 updates
replicatedhq/replicated-sdk #318
chore(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
huhouhua/glctl #50
build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
open-policy-agent/opa-control-plane #61
chore(deps): bump the all group across 1 directory with 11 updates
kubernetes-sigs/cluster-api-provider-gcp #1530
chore(deps): bump the misc-deps group across 1 directory with 4 updates
kcl-lang/flux-kcl-controller #255
build(deps): bump the gomod group across 1 directory with 5 updates
nais/naiserator #630
chore(deps): Bump the production-dependencies group across 1 directory with 24 updates
kubevirt/vm-console-proxy #376
build(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10 in /bib in the go-deps group
osbuild/bootc-image-builder #1049
chore(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
thc1006/nephoran-intent-operator #228
build(deps): bump github.com/spf13/pflag from 1.0.6 to 1.0.10
build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10
squat/generic-device-plugin #88
build(deps): Bump github.com/spf13/pflag from 1.0.7 to 1.0.10 in /client/v2
Future-Systems-Lab/cosmos-sdk #40
build(deps): Bump github.com/spf13/pflag from 1.0.7 to 1.0.10 in /simapp
Future-Systems-Lab/cosmos-sdk #16
build(deps): bump the build group with 16 updates
prestist/ignition #206
Bump the all group across 2 directories with 27 updates
AndrewSirenko/aws-ebs-csi-driver #84
Bump the all group across 2 directories with 28 updates
kubernetes-sigs/aws-ebs-csi-driver #2659
chore(deps): Bump the production-dependencies group across 1 directory with 22 updates
kubevirt/vm-console-proxy #375
Bump the go-deps group across 1 directory with 6 updates
fluxcd/helm-controller #1295
Bump the gomod group with 12 updates
scylladb/scylla-operator #2948
build(deps): bump github.com/spf13/pflag from 1.0.6 to 1.0.10
virtual-kubelet/virtual-kubelet #1338
deps: bump the all-go-minor-and-patch group with 25 updates
Azure/azure-container-networking #4031
:seedling: Bump github.com/spf13/pflag from 1.0.9 to 1.0.10 in the spf13 group
open-cluster-management-io/managed-serviceaccount #230
Bump the go-modules group with 22 updates
paketo-buildpacks/pip-install #494
build(deps): bump the gomod group across 4 directories with 2 updates
chore(deps): bump the security group across 1 directory with 13 updates
replicatedhq/troubleshoot #1841
build(deps): bump github.com/spf13/pflag from 1.0.8 to 1.0.10 in /src/go/rdctl
rak-phillip/rancher-desktop #726
build(deps): bump the build group across 1 directory with 16 updates
coreos/ignition #2125
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 |