// BoolFunc:
func (f *FlagSet) BoolFunc(name string, usage string, fn func(string) error) {
func (f *FlagSet) BoolFuncP(name, shorthand string, usage string, fn func(string) error) {
func BoolFunc(name string, usage string, fn func(string) error) {
func BoolFuncP(name, shorthand string, fn func(string) error, usage string) { // <- 'fn' value appears before 'usage' string
// Func:
func (f *FlagSet) Func(name string, usage string, fn func(string) error) {
func (f *FlagSet) FuncP(name string, shorthand string, usage string, fn func(string) error) {
func Func(name string, fn func(string) error, usage string) { // <- 'fn' value appears before 'usage' string
func FuncP(name, shorthand string, fn func(string) error, usage string) { // <- 'fn' value appears before 'usage' string
following !429 : an unfortunate discrepancy landed in the order of arguments for the new functions
.BoolFunc()and.Func():taking the
flagpackage from the stdlib as a reference, the order of arguments should always bename(s), usage, fn. (node: the link to go code reflects the state ofmasterbranch on 2025-06-27)