placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
Andrew Thornton 2021-07-23 17:43:56 +01:00
parent 21c99a7e82
commit d848e2170b
No known key found for this signature in database
GPG Key ID: 3CDE74631F13A748
1 changed files with 8 additions and 3 deletions

11
main.go
View File

@ -71,6 +71,14 @@ func main() {
},
}
copyGlobalFlags(app)
if err := app.Run(os.Args); err != nil {
fmt.Printf("Failed to run app with %s: %v\n", os.Args[1:], err)
}
}
func copyGlobalFlags(app *cli.App) {
for _, command := range app.Commands {
originalFlagNames := make([]string, 0, len(command.Flags))
for _, flag := range command.Flags {
@ -94,7 +102,4 @@ func main() {
}
}
if err := app.Run(os.Args); err != nil {
fmt.Printf("Failed to run app with %s: %v\n", os.Args[1:], err)
}
}