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
cmd/go: difficult to diagnose when build constraints are not followed by a blank line #36510
go version go1.13.5 windows/amd64
I have the package wich contains two files, one for windows and other for unix.
when I try to build them on windows, i get this error:
the windows implementation contains only pure go code, but unix version have some c code in it, and go tries to process this code with help of gcc.
and when I delete the unix implementation file, windows version builds perfectly.
The comment in https://github.com/brimstone/go-shellcode/blob/ed69073cc3bfaacbe8c0e37e1b5e1dd8be2eda16/shellcode_unix.go#L1 is not followed by a blank line, so it is interpreted as a package comment rather than a build constraint.
In that case, I don't think there is anything more to be done for this issue.