ensure, that each config is only parsed once

This commit is contained in:
Willy Kloucek
2022-01-03 19:08:11 +01:00
parent e37eff7dc8
commit 11466c5f9a
38 changed files with 70 additions and 262 deletions

View File

@@ -5,7 +5,6 @@ import (
"os"
"github.com/owncloud/ocis/graph-explorer/pkg/config"
"github.com/owncloud/ocis/graph-explorer/pkg/config/parser"
"github.com/owncloud/ocis/ocis-pkg/clihelper"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/thejerf/suture/v4"
@@ -29,11 +28,8 @@ func GetCommands(cfg *config.Config) cli.Commands {
// Execute is the entry point for the graph-explorer command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "graph-explorer",
Usage: "Serve Graph-Explorer for oCIS",
Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg)
},
Name: "graph-explorer",
Usage: "Serve Graph-Explorer for oCIS",
Commands: GetCommands(cfg),
})