List all types implementing an interface in Go

1.3k views Asked by At

I'm new to Go, and I'd like to know if there's a way in Goland or w/ a CLI tool to list all the types that implement a given interface.

I found a tool called guru that can list all interfaces implemented by a given type, but I haven't been able to make it work in CLI.

1

There are 1 answers

0
dlsniper On BEST ANSWER

You can use Navigate | Declaration or Navigate | Implementation(s) on any type/interface and you'll see a list of interfaces implemented by a type or of types implementing an interface.

You can also use the green buttons on the IDE left side next to their type definitions to perform the same actions.