How to know what interfaces are implemented by a struct in the IDE?


I am extending a 3rd party codebase. It’s well written and structured and provides some interfaces to easily swap some implementations. I found exactly the interface I needed and implemented some parts of it. However, I can’t find the interface now anymore, (searched <30s).

So I would like to know, what’s is the best way to see what interfaces are implemented by which struct? Stupid implicit declaration -.-

Best regards! :slight_smile:

If your IDE integrates the guru tool then you just need to run the guru implements command on the type whose implementations you want to see.

I use vim with the vim-go plugin primarily so I put my cursor on the line with the struct and type :GoImplements.

Edit: updated to specify the guru tool instead of the oracle tool since it was renamed.

oracle has been renamed into guru.

Ah cool good to know… unfortunately it’s not supported by the jetbrains plugin yet :frowning: Hopefully godland comes with an integration

Thanks :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.