示例#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()
	}
}
示例#2
0
文件: depcon.go 项目: f1yegor/depcon
// 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()
	}
}