An open API service for producing an overview of a list of open source projects.

https://github.com/spf13/pflag

Score: 37.493465966552954

Last synced: about 17 hours ago
JSON representation

Repository metadata:

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.


Owner metadata:


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 265
Total Committers: 91
Avg Commits per committer: 2.912
Development Distribution Score (DDS): 0.826

Commits in past year: 39
Committers in past year: 12
Avg Commits per committer in past year: 3.25
Development Distribution Score (DDS) in past year: 0.667

Name Email Commits
Eric Paris e****s@r****m 46
Alex Ogier a****r@g****m 33
Albert Nigmatzianov a****a@g****m 27
Sebastiaan van Stijn g****b@g****l 13
Tomas Aschan 1****n 10
spf13 s****a@g****m 6
Alec Thomas a****c@s****g 5
Filipe Brandenburger f****n@g****m 5
therealmitchconnors m****s@g****m 5
Anastasis Andronidis a****0@y****r 4
Ethan P. e****t@h****l 4
Georges Varouchas g****s@g****m 4
MidnightRocket g****t@m****v 3
Maximilian Frank m****k@m****m 3
Mark Sagi-Kazar m****r@g****m 3
Christophe Serafin c****n@g****m 3
Cameron Moore m****n@g****m 3
Bjørn Erik Pedersen b****n@g****m 2
Bill Johnson 4****e 2
Daniel Nephin d****n@g****m 2
Hu Jun h****k@g****m 2
John Schnake j****n@a****m 2
Noah Dietz n****z 2
Steven Roose s****e@g****m 2
Tamal Saha t****l@a****m 2
Bhargav Ravuri v****n@g****m 2
caie w****r@g****m 2
Tim Hockin t****n@g****m 2
shawn x****1@g****m 2
wu8685 o****5@g****m 2
and 61 more...

Issue and Pull Request metadata

Last synced: 6 days ago

Total issues: 92
Total pull requests: 119
Average time to close issues: almost 2 years
Average time to close pull requests: 12 months
Total issue authors: 87
Total pull request authors: 79
Average comments per issue: 2.8
Average comments per pull request: 2.7
Merged pull request: 29
Bot issues: 0
Bot pull requests: 0

Past year issues: 8
Past year pull requests: 20
Past year average time to close issues: 29 days
Past year average time to close pull requests: 5 days
Past year issue authors: 6
Past year pull request authors: 10
Past year average comments per issue: 0.5
Past year average comments per pull request: 0.85
Past year merged pull request: 7
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/spf13/pflag

Top Issue Authors

  • tomasaschan (3)
  • rew1nter (2)
  • johnSchnake (2)
  • kevgo (2)
  • mmatczuk (1)
  • peter-mogensen (1)
  • papadeltasierra (1)
  • mkyc (1)
  • sixolet (1)
  • carlisia (1)
  • zackelan (1)
  • mjskier (1)
  • jzelinskie (1)
  • muir (1)
  • nektro (1)

Top Pull Request Authors

  • fredbi (5)
  • thaJeztah (5)
  • LeGEC (4)
  • cornfeedhobo (4)
  • tomasaschan (3)
  • eth-p (2)
  • pohly (2)
  • ardrabczyk (2)
  • pterjan (2)
  • max-frank (2)
  • vaguecoder (2)
  • timandy (2)
  • e-nikolov (2)
  • opencoff (2)
  • dubrie (2)

Top Issue Labels

  • type: documentation (1)

Top Pull Request Labels

  • type: bug (2)
  • type: documentation (1)

Package metadata

proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://pkg.go.dev/github.com/spf13/pflag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.106Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 57,644
  • Dependent Repositories: 140,663
  • Docker Downloads: 73,396,593,473
  • Rankings:
    • Docker downloads count: 0.002%
    • Dependent packages count: 0.002%
    • Dependent repos count: 0.005%
    • Average: 0.606%
    • Stargazers count: 1.439%
    • Forks count: 1.584%
proxy.golang.org: 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.

  • Homepage: https://github.com/Spf13/pflag
  • Documentation: https://pkg.go.dev/github.com/Spf13/pflag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.135Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 1.608%
    • Forks count: 1.722%
    • Average: 3.524%
    • Dependent packages count: 5.207%
    • Dependent repos count: 5.557%
proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/pFlag
  • Documentation: https://pkg.go.dev/github.com/spf13/pFlag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.116Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 0.896%
    • Forks count: 0.999%
    • Average: 4.56%
    • Dependent packages count: 6.999%
    • Dependent repos count: 9.346%
proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/Pflag
  • Documentation: https://pkg.go.dev/github.com/spf13/Pflag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.114Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 0.896%
    • Forks count: 0.999%
    • Average: 4.56%
    • Dependent packages count: 6.999%
    • Dependent repos count: 9.346%
proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/PFLAG
  • Documentation: https://pkg.go.dev/github.com/spf13/PFLAG#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:27.188Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 4.842%
    • Average: 5.005%
    • Dependent repos count: 5.167%
proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/pflaG
  • Documentation: https://pkg.go.dev/github.com/spf13/pflaG#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.124Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 4.894%
    • Average: 5.059%
    • Dependent repos count: 5.223%
proxy.golang.org: 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.

  • Homepage: https://github.com/SPF13/pflag
  • Documentation: https://pkg.go.dev/github.com/SPF13/pflag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.136Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 4.916%
    • Average: 5.081%
    • Dependent repos count: 5.246%
proxy.golang.org: 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.

  • Homepage: https://github.com/spf13/pFLAG
  • Documentation: https://pkg.go.dev/github.com/spf13/pFLAG#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: v1.0.10 (published 9 months ago)
  • Last Synced: 2026-05-13T10:37:26.144Z (5 days ago)
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.029%
    • Average: 5.198%
    • Dependent repos count: 5.366%
proxy.golang.org: github.com/avamsi/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.

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://pkg.go.dev/github.com/avamsi/pflag#section-documentation
  • Licenses: BSD-3-Clause
  • Latest release: (published 6 days ago)
  • Last Synced: 2026-05-13T10:37:18.959Z (5 days ago)
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 1.399%
    • Forks count: 1.556%
    • Average: 5.431%
    • Dependent packages count: 8.463%
    • Dependent repos count: 10.306%
debian-10: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://packages.debian.org/buster/golang-github-spf13-pflag
  • Licenses:
  • Latest release: 1.0.3-1 (published 3 months ago)
  • Last Synced: 2026-03-13T07:07:09.336Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-03-12T08:04:54.832Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Status: removed
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-02-05T17:02:06.769Z (3 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.10: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-03-10T05:03:18.306Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
guix: go-github-com-spf13-pflag

Replacement for Go's @code{flag} package

ubuntu-24.10: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-03-08T16:48:31.259Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-11: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://packages.debian.org/bullseye/golang-github-spf13-pflag
  • Licenses:
  • Latest release: 1.0.5-2 (published 3 months ago)
  • Last Synced: 2026-03-14T15:31:54.537Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-13: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://packages.debian.org/trixie/golang-github-spf13-pflag
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-03-13T20:08:30.108Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Licenses:
  • Latest release: 1.0.5-1 (published 3 months ago)
  • Last Synced: 2026-03-08T04:56:05.228Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Licenses:
  • Latest release: 1.0.5-2 (published 3 months ago)
  • Last Synced: 2026-03-07T04:41:51.314Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: golang-github-spf13-pflag

  • Homepage: https://github.com/spf13/pflag
  • Documentation: https://packages.debian.org/bookworm/golang-github-spf13-pflag
  • Licenses:
  • Latest release: 1.0.6~git20210604-d5e0c0615ace-1 (published 3 months ago)
  • Last Synced: 2026-03-13T00:11:38.596Z (2 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%