mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 17:30:29 -06:00
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)
30 lines
543 B
Go
30 lines
543 B
Go
package command
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
|
|
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
|
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// Execute is the entry point for the ocis command.
|
|
func Execute() error {
|
|
cfg := config.DefaultConfig()
|
|
|
|
app := clihelper.DefaultApp(&cli.App{
|
|
Name: "ocis",
|
|
Usage: "ownCloud Infinite Scale",
|
|
})
|
|
|
|
for _, fn := range register.Commands {
|
|
app.Commands = append(
|
|
app.Commands,
|
|
fn(cfg),
|
|
)
|
|
}
|
|
|
|
return app.Run(os.Args)
|
|
}
|