mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 11:51:16 -06:00
removed all flagset packages
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/proxy/pkg/config"
|
||||
"github.com/owncloud/ocis/proxy/pkg/flagset"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -17,7 +16,9 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListProxyWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
"github.com/owncloud/ocis/proxy/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// ListProxyWithConfig applies the config to the list commands flags.
|
||||
func ListProxyWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "service-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.OIDC.Issuer, "com.owncloud.web"),
|
||||
Usage: "Set the base namespace for the service namespace",
|
||||
EnvVars: []string{"PROXY_SERVICE_NAMESPACE"},
|
||||
Destination: &cfg.Service.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "service-name",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Name, "proxy"),
|
||||
Usage: "Service name",
|
||||
EnvVars: []string{"PROXY_SERVICE_NAME"},
|
||||
Destination: &cfg.Service.Name,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user