-
Notifications
You must be signed in to change notification settings - Fork 18k
go/build: provide function to enumerate valid target combinations #47790
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
Comments
Use |
(See context at #12270.) Actually, I'll leave this open since you specifically asked for a Go API. But I think the answer will probably be to use |
I'm not even sure which package this would go in, but I took a guess. Feel free to update the title if you have a better idea. |
CC @rsc I guess? |
@cespare Yes, an API would be more efficient than a shell command. I do appreciate the tip. I can use I am planning on wrapping https://github.com/mcandre/factorio Works similar to the venerable gox utility, but with simpler options. Mostly pass-through. Now that the platform metadata comes dynamically from the real |
I agree with @cespare that you want Getting the information from
Executing |
Please provide a reliable function to dynamically query the list of valid (GOOS, GOARCH) combinations, so that application maintainers can plug directly into this system and build as many ports as possible.
Certain workarounds have limitations:
This could all be streamlined with a first party API. An array of combination strings would be nice. Or a hashmap of valid combination strings, which could serve for both enumeration and efficient validation, acting logically as a mathematical set for existence / non-existence checks.
The text was updated successfully, but these errors were encountered: