there is no ability to view available fields on Cmd+P at the moment, the closest you can get is to invoke Ctrl+Q on struct name or hover the mouse with Cmd pressed over struct name - both show struct fields. Viewing fields on Cmd+P seems to be more convenient, I've filed a feature request for that: https://youtrack.jetbrains.com/issue/GO-5983, please watch/vote for it.
Thanks for the tips. The second solution (hover the mouse with Cmd pressed over struct name) works for me. That is quite helpful. For some reason Ctrl+Q does not do anything.
BTW do you want to set value of all the fields? If so, then there is an intention inside a struct literal doing just that. There is also an intention which fills fields recursively.
Hi Bharat,
there is no ability to view available fields on Cmd+P at the moment, the closest you can get is to invoke Ctrl+Q on struct name or hover the mouse with Cmd pressed over struct name - both show struct fields. Viewing fields on Cmd+P seems to be more convenient, I've filed a feature request for that: https://youtrack.jetbrains.com/issue/GO-5983, please watch/vote for it.
Thanks for the tips. The second solution (hover the mouse with Cmd pressed over struct name) works for me. That is quite helpful. For some reason Ctrl+Q does not do anything.
I voted for the feature request. Thanks again.
BTW do you want to set value of all the fields? If so, then there is an intention inside a struct literal doing just that. There is also an intention which fills fields recursively.