From: Sebastian Gassner Date: Thu, 30 Jun 2022 13:37:04 +0000 (+0000) Subject: flag: highlight support for double dashes in docs X-Git-Tag: go1.19rc1~16 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9a4d5357f4;p=gostls13.git flag: highlight support for double dashes in docs Updating examples, to show that double dashes are also permitted. This has been easy to miss previously. Change-Id: Ib67b4e39fea90ef4cb9e894709c53baedfc18fc2 GitHub-Last-Rev: f7df57b646d6412c1346e85c3a7353a8df41afc6 GitHub-Pull-Request: golang/go#53628 Reviewed-on: https://go-review.googlesource.com/c/go/+/415374 Reviewed-by: Rob Pike Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: David Chase TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor --- diff --git a/src/flag/flag.go b/src/flag/flag.go index a0762441a5..9abf8d769e 100644 --- a/src/flag/flag.go +++ b/src/flag/flag.go @@ -49,10 +49,11 @@ The arguments are indexed from 0 through flag.NArg()-1. The following forms are permitted: -flag + --flag // double dashes are also permitted -flag=x -flag x // non-boolean flags only -One or two minus signs may be used; they are equivalent. +One or two dashes may be used; they are equivalent. The last form is not permitted for boolean flags because the meaning of the command