Files
opencloud/graph/pkg/flagset/flagset.go
2021-11-05 11:15:55 +01:00

21 lines
534 B
Go

package flagset
import (
"github.com/owncloud/ocis/graph/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// HealthWithConfig applies cfg to the root flagset
func HealthWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
Usage: "Address to debug endpoint",
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
}