An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/spf13/pflag

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.
7 versions
Latest release: over 5 years ago
57,644 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/spf13/pflag

Dependent Repos 49

SocialGouv/rollout-status Fork of clusterise/rollout-status
Alternative to kubectl rollout status

Size: 3.95 MB - Last synced: 7 days ago - Pushed: 3 months ago

SocialGouv/sealed-secrets Fork of bitnami-labs/sealed-secrets
A Kubernetes controller and tool for one-way encrypted Secrets

Size: 39.6 MB - Last synced: 7 days ago - Pushed: 7 months ago

ANSSI-FR/ultrablue
User-friendly Lightweight TPM Remote Attestation over Bluetooth

Size: 3.87 MB - Last synced: about 16 hours ago - Pushed: over 2 years ago

InseeFrLab/gonyxia-api

Size: 98.6 KB - Last synced: about 5 hours ago - Pushed: 5 days ago

InseeFrLab/onyxia-cli
WIP

Size: 53.7 KB - Last synced: about 5 hours ago - Pushed: 6 days ago

InseeFrLab/onyxia-onboarding
Onboarding for the Onyxia datalab

Size: 68.4 KB - Last synced: about 5 hours ago - Pushed: over 1 year ago

InseeFrLab/onyxia-onboarding-operator
An operator for onyxia's onboarding tasks

Size: 71.3 KB - Last synced: about 5 hours ago - Pushed: over 1 year ago

InseeFrLab/s3-operator
A simple operator to dynamically create S3 buckets and policies

Size: 324 KB - Last synced: about 5 hours ago - Pushed: 3 days ago

InseeFrLab/utils
A collection of scripts that may have been used at some point :)

Size: 41 KB - Last synced: about 5 hours ago - Pushed: over 1 year ago

COSAE-FR/ripacb
RIP ACB Server and client

Size: 91.8 KB - Last synced: about 1 month ago - Pushed: 8 months ago

COSAE-FR/ripradius
Radius authentication cache

Size: 111 KB - Last synced: about 1 month ago - Pushed: 8 months ago

SocialGouv/3s

Size: 5.92 MB - Last synced: 7 days ago - Pushed: about 1 year ago

SocialGouv/secretgen-controller Fork of carvel-dev/secretgen-controller
secretgen-controller provides CRDs to specify what secrets need to be on Kubernetes cluster (to be generated or not)

Size: 30.4 MB - Last synced: 7 days ago - Pushed: about 1 year ago

SocialGouv/oblik
An operator designed to watch VPA objects and apply resources recommendations to Deployments and StatefulSets based on configurable annotations

Size: 9.01 MB - Last synced: 7 days ago - Pushed: about 1 month ago

SocialGouv/mattermost-plugin-google-calendar Fork of waseem18/mattermost-plugin-google-calendar
Mattermost plugin for Google Calendar - In rapid development

Size: 553 KB - Last synced: 7 days ago - Pushed: about 1 year ago

CEREMA/k3s-snapshots

Size: 6.12 MB - Last synced: 3 days ago - Pushed: about 3 years ago

CEREMA/k3-utils

Size: 6.15 MB - Last synced: 3 days ago - Pushed: almost 3 years ago