예제 #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()
	}
}