Closed zyguan closed 6 years ago
No worries. Thanks for the PR!
Can you share a sample output with your changes applied, so we can discuss the feature with others?
Hi, @VojtechVitek , I just updated the description of this PR. Is it clear enough?
@zyguan thanks for clarification. This is nice addition.
I just wonder if printing the original order from Supfile wouldn't be better. This would require us to change the underlying map into a slice. What do you think?
But this is a step forward anyway. We could merge it as is, if you will.
@VojtechVitek I agree with you, Printing the original order from Supfile is a better idea. But I wonder if other users also approve it. If so, I'm willing to update this PR.
@zyguan please do, I heard 5+ requests for this already :)
Hi, @VojtechVitek ! I just replaced the networks map with a slice of NamedNetwork
in fad7ef3, does it look good to you?
It's straightforward but a little inefficient since it will call unmarshal
twice! Do you have any better solution?
Maybe I'd better rename the type Networks
to NamedNetworks
...
@VojtechVitek I just updated this PR, please correct me if I did something wrong :)
@zyguan thanks! I'll check it out later today.
@VojtechVitek take your time :)
When printing usage,
networkUsage
andcmdUsage
iterate the maps directly, which may lead to different outputs (not in a same order) every time.This PR just sorts the names of available networks/targets/commands before iterating and printing them so that they are listed by alphabetical order.