Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/sys/unix: consolidate duplicate information #33059
In the current golang.org/x/sys/unix package, there is a lot of duplication, especially in the GNU/Linux files. We currently support 13 different
This doesn't really matter all that much, but it does make the package somewhat larger than necessary and makes it slightly harder to review CLs. Since we generate the information automatically anyhow, I propose that we add another step: run a merge step on all the files for a given
I am having a "go" at this, since I have been using the go/ast recently and would like to finally contribute to the project.
I have a few questions as I have started looking into this.
We should only be looking at merging information in the generated files, whose names all start with 'z'. The merged file names should also start with 'z'. We currently have 13 files zerrors_linux_GOARCH.go. I'm suggesting that the common aspects be merged into zerrors_linux.go.
We shouldn't touch the non-generated files, at least not with an automated process.
In the generated files it is not important to preserve blocks of constants.