Skip to content

Commit

Permalink
Remove redundant setting of cli.HelpFlag
Browse files Browse the repository at this point in the history
The help flag is configured automatically by default already. We don't
need to redo that for every single service.

This also addresses one of the finding of "go race" (#4088)
  • Loading branch information
rhafer committed Jul 5, 2022
1 parent 41226de commit 4a09d8a
Show file tree
Hide file tree
Showing 31 changed files with 0 additions and 155 deletions.
5 changes: 0 additions & 5 deletions ocis/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,5 @@ func Execute() error {
)
}

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}
5 changes: 0 additions & 5 deletions services/app-provider/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/app-registry/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/audit/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/auth-basic/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/auth-bearer/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/auth-machine/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/frontend/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/gateway/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/graph-explorer/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/graph/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Usage: "Serve Graph API for oCIS",
Commands: GetCommands(cfg),
})
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/groups/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/idm/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/idp/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/nats/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/notifications/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/ocdav/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/ocs/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/proxy/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/search/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ func Execute(cfg *config.Config) error {
Usage: "Serve search API for oCIS",
Commands: GetCommands(cfg),
})
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/settings/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/sharing/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/storage-publiclink/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/storage-shares/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/storage-system/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/storage-users/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/store/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/thumbnails/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/users/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/web/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down
5 changes: 0 additions & 5 deletions services/webdav/pkg/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ func Execute(cfg *config.Config) error {
Commands: GetCommands(cfg),
})

cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}

return app.Run(os.Args)
}

Expand Down

0 comments on commit 4a09d8a

Please sign in to comment.