From bc451569524e296790cb621266a02352b2887463 Mon Sep 17 00:00:00 2001 From: Tom <73077675+tmzane@users.noreply.github.com> Date: Tue, 17 Oct 2023 03:41:15 +0300 Subject: [PATCH] fix: replace `flag.BoolFunc` with `flag.Func` (#12) --- sloglint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sloglint.go b/sloglint.go index 9c2d971..4e45206 100644 --- a/sloglint.go +++ b/sloglint.go @@ -47,7 +47,7 @@ func flags(opts *Options) flag.FlagSet { fs := flag.NewFlagSet("sloglint", flag.ContinueOnError) boolVar := func(value *bool, name, usage string) { - fs.BoolFunc(name, usage, func(s string) error { + fs.Func(name, usage, func(s string) error { v, err := strconv.ParseBool(s) *value = v return err