mirror of https://github.com/golang/go.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 <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>
This commit is contained in:
parent
39bafed102
commit
d329fc5b30
|
|
@ -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 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue