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

**URL:** <https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079>\
**Category:** Getting Help\
**Created:** [December 19, 2016, 3:06pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079 "2016-12-19T15:06:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![21stio](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/2/49beb7/32.png) [@21stio](https://forum.golangbridge.org/u/21stio)\
**Post date:** [December 19, 2016, 3:06pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079/1 "2016-12-19T15:06:15Z")

</div>

Hi,

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! 🙂

---

<div class="post-metadata">

**Author:** ![Quincy](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/quincy/32/795_2.png) [@Quincy](https://forum.golangbridge.org/u/Quincy)\
**Post date:** [December 19, 2016, 9:39pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079/2 "2016-12-19T21:39:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bins](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/bins/32/3183_2.png) [@bins](https://forum.golangbridge.org/u/bins)\
**Post date:** [December 21, 2016, 8:40pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079/3 "2016-12-21T20:40:21Z")

</div>

`oracle` has been renamed into `guru`.  
see:  
[https://godoc.org/golang.org/x/tools/cmd/guru](https://godoc.org/golang.org/x/tools/cmd/guru)

---

<div class="post-metadata">

**Author:** ![21stio](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/2/49beb7/32.png) [@21stio](https://forum.golangbridge.org/u/21stio)\
**Post date:** [December 22, 2016, 3:57pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079/4 "2016-12-22T15:57:38Z")

</div>

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

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [March 22, 2017, 3:57pm UTC](https://forum.golangbridge.org/t/how-to-know-what-interfaces-are-implemented-by-a-struct-in-the-ide/4079/5 "2017-03-22T15:57:48Z")

</div>

Closed on March 22, 2017, 3:57pm UTC

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