Beispiel #1
0
// Main Entry point called by main - responsible for detecting if this is a first run without a config
// to force initial setup
func Execute() {
	file, found := cliconfig.HasExistingConfig()
	if found {
		configFile = file
		executeWithExistingConfig()
	} else {
		logger.Logger().Error("%s file not found.  Generating initial configuration", file.Filename())
		configFile = cliconfig.CreateNewConfigFromUserInput()
	}
}
Beispiel #2
0
// Main Entry point called by main - responsible for detecting if this is a first run without a config
// to force initial setup
func Execute() {
	rootCmd.Long = fmt.Sprintf(DepConHelp, Version, BuildDate)
	file, found := cliconfig.HasExistingConfig()
	if found {
		configFile = file
		executeWithExistingConfig()
	} else {
		logger.Logger().Error("%s file not found.  Generating initial configuration", file.Filename())
		configFile = cliconfig.CreateNewConfigFromUserInput()
	}
}