add configure command

This commit is contained in:
vagrant
2020-04-10 15:22:57 +00:00
parent 59b11eb80c
commit 1c5f30f5be
4 changed files with 147 additions and 1 deletions

View File

@@ -31,13 +31,14 @@ var root = &cobra.Command{
func init() {
root.PersistentFlags().StringVar(&configPath, "config", "config.yml", "set the location for the configuration file")
root.PersistentFlags().BoolVar(&debug, "debug", false, "pass in order to run wings in debug mode")
root.AddCommand(configureCmd)
}
func rootCmdRun(cmd *cobra.Command, args []string) {
c, err := config.ReadConfiguration(configPath)
if err != nil {
panic(err)
return
}
if debug {