]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: mention flag.BoolFunc
authorIan Lance Taylor <iant@golang.org>
Tue, 30 May 2023 22:27:29 +0000 (15:27 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 31 May 2023 16:25:16 +0000 (16:25 +0000)
For #53747

Change-Id: Ia5e2f89c1184f2dfd6d672b838b0dbb579e6c954
Reviewed-on: https://go-review.googlesource.com/c/go/+/499417
Reviewed-by: Eli Bendersky <eliben@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

doc/go1.21.html

index d0fd953ba12db9963f330d9f2a38c6713bd5e2e9..a30811794cba90aa4e83687b9f64aa58dae3e25f 100644 (file)
@@ -495,12 +495,14 @@ Do not send CLs removing the interior tags from such phrases.
 
 <dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
   <dd>
-    <p><!-- https://go.dev/issue/53747 -->
-      TODO: <a href="https://go.dev/issue/53747">https://go.dev/issue/53747</a>: add BoolFunc(name, usage string, fn func(string)error)
-    </p>
-
-    <p><!-- CL 476015 -->
-      TODO: <a href="https://go.dev/cl/476015">https://go.dev/cl/476015</a>: flag: add BoolFunc; FlagSet.BoolFunc; modified api/next/53747.txt
+    <p><!-- https://go.dev/issue/53747, CL 476015 -->
+      The new <a href="/pkg/flag/#BoolFunc"><code>BoolFunc</code></a>
+      function and
+      <a href="/pkg/flag/#FlagSet.BoolFunc"><code>FlagSet.BoolFunc</code></a>
+      method define a flag that does not require an argument and calls
+      a function when the flag is used. This is similar to
+      <a href="/pkg/flag/#Func"><code>Func</code></a> but for a
+      boolean flag.
     </p>
 
     <p><!-- CL 480215 -->