Skip to content

Commit 6fb36b3

Browse files
authored
Revert "Doc:(issue_1593) Add flag category topic in docs"
1 parent 531e838 commit 6fb36b3

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

docs/v2/examples/flags.md

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -230,57 +230,6 @@ That flag can then be set with `--lang spanish` or `-l spanish`. Note that
230230
giving two different forms of the same flag in the same command invocation is an
231231
error.
232232

233-
#### Grouping
234-
235-
You can associate a category for each flag to group them together in the help output, e.g:
236-
237-
```go
238-
package main
239-
240-
import (
241-
"log"
242-
"os"
243-
244-
"github.com/urfave/cli/v2"
245-
)
246-
247-
func main() {
248-
app = &cli.App{
249-
Flags: []cli.Flag{
250-
&cli.BoolFlag{
251-
Name: "silent",
252-
Aliases: []string{"s"},
253-
Usage: "no messages",
254-
Category: "Miscellaneous:",
255-
},
256-
&cli.BoolFlag{
257-
Name: "perl-regexp",
258-
Aliases: []string{"P"},
259-
Usage: "PATTERNS are Perl regular expressions",
260-
Category: "Pattern selection:",
261-
},
262-
},
263-
}
264-
265-
if err := app.Run(os.Args); err != nil {
266-
log.Fatal(err)
267-
}
268-
}
269-
```
270-
271-
Will result in help output like:
272-
273-
```
274-
GLOBAL OPTIONS:
275-
Miscellaneous:
276-
277-
--silent, -s no messages (default: false)
278-
279-
Pattern selection:
280-
281-
--perl-regexp, -P PATTERNS are Perl regular expressions (default: false)
282-
```
283-
284233
#### Ordering
285234

286235
Flags for the application and commands are shown in the order they are defined.

0 commit comments

Comments
 (0)