Open kaihoffman opened 2 years ago
Hi @kaihoffman @andyjeffries @DMajrekar I would love to work on this. Could you assign this issue to me?
@kitarp29 did you have a chance to look at this? Would love to be able to close this off!
Hi @kaihoffman Sorry for the delay got stuck with University exams. Could you direct me to right file or location I will find the output to the commands?
It would need to determine whether the resourcetype is found, and determine the output accordingly @kitarp29 .
For example, the instance ls
command output is at https://github.com/civo/cli/blob/master/cmd/instance/instance_list.go but it would need to apply equally to other resource types that can be listed.
If the fix I applied here works for you, I will replicate for the other commands as well :)
Hey @kaihoffman Could have a look into this It's not a big breaking change, if you could conform we can get this done sooner.
@kitarp29 I'm not the best placed to judge a golang PR in our team, I'm afraid - I'll leave it to @alejandrojnm or @RealHarshThakur to have a look?
I mean I'm very new to the codebase myself, so can't say I have the best approach. But surely an approach that will work :)
It's less about the particular codebase and more about best practices @kitarp29 - I'm not qualified to judge what is efficient and idiomatic golang.
Currently, if you have selected a region where you have no resources, you may get an empty response to a listing of resources:
This is confusing especially if you do not know you have changed regions.
It might be helpful to have a note about which region you're in when listing a region with an empty output. Compare to output from a listing with instances running in it, which shows the region:
I suggest having something like