From: Ian Lance Taylor Date: Tue, 30 May 2023 22:27:29 +0000 (-0700) Subject: doc/go1.21: mention flag.BoolFunc X-Git-Tag: go1.21rc1~165 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=d329fc5b30912456733c0396a06dfebfc5faf6b3;p=gostls13.git doc/go1.21: mention flag.BoolFunc For #53747 Change-Id: Ia5e2f89c1184f2dfd6d672b838b0dbb579e6c954 Reviewed-on: https://go-review.googlesource.com/c/go/+/499417 Reviewed-by: Eli Bendersky Reviewed-by: Ian Lance Taylor TryBot-Bypass: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/doc/go1.21.html b/doc/go1.21.html index d0fd953ba1..a30811794c 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -495,12 +495,14 @@ Do not send CLs removing the interior tags from such phrases.
flag
-

- TODO: https://go.dev/issue/53747: add BoolFunc(name, usage string, fn func(string)error) -

- -

- TODO: https://go.dev/cl/476015: flag: add BoolFunc; FlagSet.BoolFunc; modified api/next/53747.txt +

+ The new BoolFunc + function and + FlagSet.BoolFunc + method define a flag that does not require an argument and calls + a function when the flag is used. This is similar to + Func but for a + boolean flag.