Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: cmd/go: add a way to query for non-defaults in the env #34208
It's common to ask users to provide
What's special about my environment? You can easily spot
It would be useful to quickly see what Go env variables were specifically modified by a user. That is, what could be special about the user's environment, that could help in reproducing a bug they're running into.
I can kind of get that right now with a bit of shell hackery, showing the changes between my
This is much better. It even has some surprises - I botched my
It would be useful to be able to print a summary like the above, perhaps with
I think this is a good idea, both because it helps us and because it might help the user with "bugs" that are really misconfigurations. Would it make sense to simply enhance the existing output with a trailing shell comment for the modified ones, that way it still copy-pastes as environment variable settings? E.g.
That would work for me too. Though that might be a little too close to shell syntax for people's comfort :)
I also wonder if backwards compatibility would be a problem. For example,