mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add fmt-gen subcommand (#20192)
fmt-gen subcommand is only available when built with build tag `fmtgen`.
This commit is contained in:
committed by
GitHub
parent
4c8562bcec
commit
01a8c09920
@@ -107,6 +107,11 @@ func newApp(name string) *cli.App {
|
||||
|
||||
// registerCommand registers a cli command.
|
||||
registerCommand := func(command cli.Command) {
|
||||
// avoid registering commands which are not being built (via
|
||||
// go:build tags)
|
||||
if command.Name == "" {
|
||||
return
|
||||
}
|
||||
commands = append(commands, command)
|
||||
commandsTree.Insert(command.Name)
|
||||
}
|
||||
@@ -134,6 +139,7 @@ func newApp(name string) *cli.App {
|
||||
|
||||
// Register all commands.
|
||||
registerCommand(serverCmd)
|
||||
registerCommand(fmtGenCmd)
|
||||
|
||||
// Set up app.
|
||||
cli.HelpFlag = cli.BoolFlag{
|
||||
|
||||
Reference in New Issue
Block a user