aboutsummaryrefslogtreecommitdiff
path: root/.editorconfig
diff options
context:
space:
mode:
authorSebastiaan van Stijn <[email protected]>2025-09-01 12:48:45 +0200
committerSebastiaan van Stijn <[email protected]>2025-09-01 23:10:11 +0200
commit18a9d17d0ee8bd64d5c2071fc031be86fa2cd328 (patch)
treeb9ff208cf79a488329fddf768cd832b21cbaaa94 /.editorconfig
parentc5b9e989df31c5d19573e50d6188550ad51a971e (diff)
move Func, BoolFunc, tests as they require go1.21
Commit 69bc3bd5b37fa90e994be9acecf7430269591713 added support for Func() and BoolFunc() to match stdlib. However, the Func method was added in [go1.16.0], and BoolFunc in [go1.21.0], so running the tests on older versions of Go would fail; docker run -it --rm -v ./:/pflag -w /pflag golang:1.21 sh -c 'go test -v ./...' # github.com/spf13/pflag [github.com/spf13/pflag.test] ./bool_func_test.go:86:28: cannot use stdFSet (type *flag.FlagSet) as type BoolFuncFlagSet in argument to runCase: *flag.FlagSet does not implement BoolFuncFlagSet (missing BoolFunc method) ./bool_func_test.go:113:21: undefined: io.Discard ./bool_func_test.go:116:28: cannot use stdFSet (type *flag.FlagSet) as type BoolFuncFlagSet in argument to runCase: *flag.FlagSet does not implement BoolFuncFlagSet (missing BoolFunc method) ./bool_func_test.go:139:7: undefined: errors.Is ./func_test.go:92:28: cannot use stdFSet (type *flag.FlagSet) as type FuncFlagSet in argument to runCase: *flag.FlagSet does not implement FuncFlagSet (missing Func method) ./func_test.go:119:21: undefined: io.Discard ./func_test.go:122:28: cannot use stdFSet (type *flag.FlagSet) as type FuncFlagSet in argument to runCase: *flag.FlagSet does not implement FuncFlagSet (missing Func method) ./func_test.go:145:7: undefined: errors.Is ./func_test.go:145:7: too many errors FAIL github.com/spf13/pflag [build failed] This patch moves the tests to a separate file that is not built for older versions of Go. [go1.16.0]: https://pkg.go.dev/[email protected]#Func [go1.21.0]: https://pkg.go.dev/[email protected]#BoolFunc Signed-off-by: Sebastiaan van Stijn <[email protected]>
Diffstat (limited to '.editorconfig')
0 files changed, 0 insertions, 0 deletions