mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-08 01:05:16 -04:00
Replace mutiple args with flags
AB#1955
This commit is contained in:
parent
469b2ff46c
commit
1189078c5a
10 changed files with 336 additions and 587 deletions
|
@ -54,7 +54,8 @@ func init() {
|
|||
cobra.EnableCommandSorting = false
|
||||
// Set output of cmd.Print to stdout. (By default, it's stderr.)
|
||||
rootCmd.SetOut(os.Stdout)
|
||||
rootCmd.PersistentFlags().String("dev-config", "", "Set this flag to create the Constellation using settings from a development config.")
|
||||
rootCmd.PersistentFlags().String("dev-config", "", "Set this flag to create the Constellation cluster using settings from a development config.")
|
||||
must(rootCmd.MarkPersistentFlagFilename("dev-config", "json"))
|
||||
rootCmd.AddCommand(newCreateCmd())
|
||||
rootCmd.AddCommand(newInitCmd())
|
||||
rootCmd.AddCommand(newVerifyCmd())
|
||||
|
@ -62,3 +63,9 @@ func init() {
|
|||
rootCmd.AddCommand(newTerminateCmd())
|
||||
rootCmd.AddCommand(newVersionCmd())
|
||||
}
|
||||
|
||||
func must(err error) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue