func mergeFiles() error {
	// Setup environment variables
	os.Setenv("GOOS", runtime.GOOS)
	os.Setenv("GOARCH", runtime.GOARCH)

	// Merge each of the four type of files
	for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum", "ztypes"} {
		cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
		err := cmd.Run()
		if err != nil {
			return fmt.Errorf("could not merge %s files: %w", ztyp, err)
		}
		fmt.Printf("%s files merged\n", ztyp)
	}

	return nil
}
// Merge all the generated files for Linux targets
Merge all the generated files for Linux targets
// Merge all the generated files for Linux targets
func mergeFiles() error {
	os.Setenv("GOOS", runtime.GOOS)
	os.Setenv("GOARCH", runtime.GOARCH)
	for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum", "ztypes"} {
		cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
		err := cmd.Run()
		if err != nil {
			return fmt.Errorf("could not merge %s files: %w", ztyp, err)
		}
		fmt.Printf("%s files merged\n", ztyp)
	}
	return nil
}
func mergeFiles ( ) error { os . Setenv ( " " , runtime . GOOS ) os . Setenv ( " " , runtime . GOARCH ) for _ , ztyp := range [ ] string { " " , " " , " " , " " } { cmd := makeCommand ( " " , " " , " " , " " , fmt . Sprintf ( " " , ztyp , GOOS ) , fmt . Sprintf ( " " , ztyp , GOOS ) ) err := cmd . Run ( ) if err != nil { return fmt . Errorf ( " " , ztyp , err ) } fmt . Printf ( " \n " , ztyp ) } return nil }
Merge all the generated files for Linux targets
Merge all the generated files for Linux targets
// Setup environment variables // Merge each of the four type of files