added write config support
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
||||
"github.com/Akilan1999/p2p-rendering-computation/client"
|
||||
"github.com/Akilan1999/p2p-rendering-computation/client/clientIPTable"
|
||||
Config "github.com/Akilan1999/p2p-rendering-computation/config"
|
||||
"github.com/Akilan1999/p2p-rendering-computation/config/generate"
|
||||
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||
"github.com/Akilan1999/p2p-rendering-computation/plugin"
|
||||
@@ -232,6 +233,12 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
standardOutput(err, nil)
|
||||
}
|
||||
|
||||
// display configuration
|
||||
if ViewConfig {
|
||||
config, err := Config.ConfigInit(nil, nil)
|
||||
standardOutput(err, config)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ var (
|
||||
AddMetaData string
|
||||
AddRootNode bool
|
||||
IP string
|
||||
ViewConfig bool
|
||||
)
|
||||
|
||||
var AppConfigFlags = []cli.Flag{
|
||||
@@ -288,4 +289,11 @@ var AppConfigFlags = []cli.Flag{
|
||||
EnvVars: []string{"IP"},
|
||||
Destination: &IP,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "ViewConfig",
|
||||
Aliases: []string{"vc"},
|
||||
Usage: "View config file",
|
||||
EnvVars: []string{"VC"},
|
||||
Destination: &ViewConfig,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user