func main()

in tools/mc2bq/main.go [143:168]


func main() {
	var params export.Params
	action, err := parseFlags(&params, os.Args[1:])
	if err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", messages.WrapError(messages.ErrorParsingFlags, err))
		os.Exit(1)
	}

	switch action {
	case actionVersion:
		fmt.Printf("mc2bq %s\n", messages.Version)
	case actionDumpSchema:
		_ = dumpEmbeddedSchema()
	case actionExport:
		err = export.Export(&params)
		if err != nil {
			fmt.Fprintf(os.Stderr, "%v\n", messages.WrapError(messages.ErrorExportingData, err))
			os.Exit(1)
		}
	case actionExitFailure:
		os.Exit(1)
	default:
		os.Exit(1)
	}

}