func main()

in cmd/yesiscan/main.go [211:237]


func main() {
	debug := false // TODO: hardcoded for now
	logf := func(format string, v ...interface{}) {
		fmt.Printf("main: "+format+"\n", v...)
	}
	program = strings.TrimSpace(program)
	version = strings.TrimSpace(version)
	if program == "" || version == "" {
		// run `go generate` before you build it.
		logf("program was not compiled correctly")
		os.Exit(1)
		return
	}

	logf("Hello from purpleidea! This is %s, version: %s", program, version)
	// FIXME: We discard output from lib's that use `log` package directly.
	log.SetOutput(io.Discard)

	err := CLI(program, debug, logf) // TODO: put these args in an input struct
	if err != nil {
		logf("failed: %+v", err)
		os.Exit(1)
		return
	}
	logf("Done!")
	os.Exit(0)
}