mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 13:09:23 -06:00
update config add desktop client with all localhost ports split flagsets add user docs update readme Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
39 lines
904 B
Go
39 lines
904 B
Go
package flagset
|
|
|
|
import (
|
|
"github.com/micro/cli"
|
|
"github.com/owncloud/ocis-reva/pkg/config"
|
|
)
|
|
|
|
// RootWithConfig applies cfg to the root flagset
|
|
func RootWithConfig(cfg *config.Config) []cli.Flag {
|
|
return []cli.Flag{
|
|
&cli.StringFlag{
|
|
Name: "config-file",
|
|
Value: "",
|
|
Usage: "Path to config file",
|
|
EnvVar: "REVA_CONFIG_FILE",
|
|
Destination: &cfg.File,
|
|
},
|
|
&cli.StringFlag{
|
|
Name: "log-level",
|
|
Value: "info",
|
|
Usage: "Set logging level",
|
|
EnvVar: "REVA_LOG_LEVEL",
|
|
Destination: &cfg.Log.Level,
|
|
},
|
|
&cli.BoolTFlag{
|
|
Name: "log-pretty",
|
|
Usage: "Enable pretty logging",
|
|
EnvVar: "REVA_LOG_PRETTY",
|
|
Destination: &cfg.Log.Pretty,
|
|
},
|
|
&cli.BoolTFlag{
|
|
Name: "log-color",
|
|
Usage: "Enable colored logging",
|
|
EnvVar: "REVA_LOG_COLOR",
|
|
Destination: &cfg.Log.Color,
|
|
},
|
|
}
|
|
}
|