how to find instances of 'construction' of a struct (not just usages)

There are many cases where a struct is newed up in not too many locations.  In java, we can open call heirarchy of constructors.  How to do in goland? as there is way way to many references/usages of the struct I am looking at and only one construction which I can't seem to find.

0
3 comments
Official comment

If the structure is initialized, it should be flagged in the "Struct Initialization" section of Find Usages, see below. Do you not have such a line in your code? If you find it using other ways but not the IDE, please let us know and provide a code sample to reproduce the issue.

 

how do you bring that screen up?  I am simply doing cmd-B and it pops up this (ie. what short cut are you using there?)

 

0

You can place the cursor on the element you want, it can by anywhere it's used not just the definition place, and then press the Find Action (Ctrl+Shift+A on Windows/Linux or Cmd+Shift+A on macOS), or Search Everywhere (Shift+Shift) and type: Find Usages

You can see the shortcut next to the item in the result list.

This will bring up the window like in my screenshot.

0

Please sign in to leave a comment.