New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/build: should export lists of all possible GOOS and GOARCH values #21544
Comments
Please note that these are not all the possible build tags. Anyone can set up their own custom build tags. What you seem to be listing here is all the (current) possible values of GOOS and GOARCH, which you can also use as build tags. Is that what you'd be interested in? |
Also note that if you meant all the build tags recognized by the Go toolchain, that list is not complete either - there's also |
Yes, just OS and arch, sorry for the confusion.
…Sent from my iPhone
On Aug 21, 2017, at 1:17 AM, Daniel Martí ***@***.***> wrote:
Also note that if you meant all the build tags recognized by the Go toolchain, that list is not complete either - there's also unix, test, fuzz among others.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
What's fuzz?
…Sent from my iPhone
On Aug 21, 2017, at 1:17 AM, Daniel Martí ***@***.***> wrote:
Also note that if you meant all the build tags recognized by the Go toolchain, that list is not complete either - there's also unix, test, fuzz among others.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
https://github.com/dvyukov/go-fuzz (this one isn't part of the Go toolchain at the moment, but it may be in the future) |
After a quick search, I found #12270, but that's not in any Go package and it's all the possible combinations, not the values separately. |
I don't really think this is well-formed. Any such list is going to be out-of-date / dependent on a very specific Go version. If you want to strip a file name of _foo suffixes, I would just remove any underscores anywhere. |
I don't understand why a maintenance concern makes this malformed. Perhaps it's possible to generate a go/build declaration from lists of OS and arch build tags defined elsewhere?
From
If I understand correctly, then foo_bar.go is a valid Go file name with no build tags in the name, and foo_bar_windows_amd64.go is a valid Go file name with OS and arch build tags in the name. If by "remove any underscores anywhere" you mean "strip a file name of _foo suffixes", then "_bar" would be stripped as well, which is incorrect. |
go/build (or one of the go/ sub-packages, at least) should export a list of all the possible build tags. This is useful when writing a tool that needs to strip a file name of all the build tags. Right now I have a list like this that I've cobbled together, but I don't know for sure that it's complete, and even if it is now, it probably won't remain so:
The text was updated successfully, but these errors were encountered: