> Graphify: shared context of codebase for agents and developers. Canonical: https://graphify.com/blog/go-interfaces-find-implementations · Full index: https://graphify.com/llms-full.txt

# Go interfaces: find every implementation and caller

*November 7, 2026 · Syed Fahad*

Go interfaces hide their implementations behind a method name. Changing that method without listing every implementer and every caller is how a compile-time surprise, or a silent one, gets through.

This walkthrough uses the Graphify CLI on a public checkout of [gin-gonic/gin](https://github.com/gin-gonic/gin) at commit `0f09c3a` (10 October 2026). The same queries work in other Go repositories. The general version of this question is in [code change blast radius](https://graphify.com/blog/code-change-blast-radius).

## How do I find every implementation of a Go interface?

Build a code graph of the repository with `graphify update .`, then look at the dispatches_to edges from the interface method, or run `graphify affected` on that method. Each dispatches_to edge points at a type that implements the method.

```bash
uv tool install --python 3.12 graphifyy
git clone https://github.com/gin-gonic/gin.git
cd gin
git checkout 0f09c3a
graphify update .
```

On this checkout the CLI read 120 files and finished in about 2 seconds. The graph had 2,230 nodes, 5,721 edges and 130 communities. Of those edges, 4,530 were EXTRACTED, 1,191 were INFERRED, and 66 were `dispatches_to` links from an interface method to an implementer. The CLI's code pass wrote no AMBIGUOUS edges. Results vary by codebase.

`BindBody` is the example to start with. gin uses a `bindingBody` interface whose `BindBody` method is implemented by a binder for each format. The graph linked the method in `binding/binding.go` to eight implementers, all tagged INFERRED:

- `binding/json.go`
- `binding/xml.go`
- `binding/yaml.go`
- `binding/toml.go`
- `binding/protobuf.go`
- `binding/msgpack.go`
- `binding/bson.go`
- `binding/plain.go`

If you change the signature of `BindBody`, those eight files are the first place to look.

## How do I find every caller of a Go interface method?

Run `graphify affected` with a path::symbol for the interface method, not the bare name. The bare name is often ambiguous because each implementer has the same method name. The scoped query lists the functions that call the interface method.

The bare query on this checkout looks like this:

```text
graphify affected "BindBody"
Ambiguous: 'BindBody' matches 10 nodes in different files.
  binding/json.go
  binding/plain.go
  binding/msgpack.go
  binding/toml.go
  binding/bson.go
  binding/protobuf.go
  binding/xml.go
  binding/yaml.go
  binding/binding_nomsgpack.go
  binding/binding.go
```

That list is already useful: it is the interface plus the implementers. To see who calls the interface method itself, scope it:

```text
graphify affected "binding/binding.go::.BindBody()"
- .ShouldBindBodyWith() [calls] context.go:L964
- .ShouldBindBodyWithJSON() [calls] context.go:L969
- .ShouldBindBodyWithPlain() [calls] context.go:L989
- .ShouldBindBodyWithTOML() [calls] context.go:L984
- .ShouldBindBodyWithXML() [calls] context.go:L974
- .ShouldBindBodyWithYAML() [calls] context.go:L979
```

The helpers on `Context` are the callers you would miss if you only opened `binding/binding.go`.

## What does a dispatches_to edge mean in a Go graph?

A dispatches_to edge links an interface method to a method on a type that implements it. In the gin graph those edges were INFERRED, so you should open the file and confirm the type really satisfies the interface before you rely on the link.

INFERRED is not a failure. It means the CLI resolved the implementer by inference rather than reading a direct, unambiguous call in the syntax tree. Open the type, check that it really implements the method, then edit both sides together.

## Why is text search a weak way to find Go implementers?

Text search finds the method name, not the relationship. Every implementer, and many unrelated methods, can share that name. A graph edge from the interface method to each implementer is the relationship you actually need.

`String` or `Bind` will produce a long grep list and a short list of true implementers. The graph does the narrowing for you, and still asks you to pick a node when the name is ambiguous. The same workflow in Python is in [how to generate a call graph for a Python project](https://graphify.com/blog/how-to-generate-a-call-graph-for-a-python-project).

The [install guide](https://graphify.com/blog/install-graphify) covers setup, and the hosted app is at [app.graphify.com](https://app.graphify.com) if you want this map for a team. After you edit the code, run `graphify update .` again, or use `graphify hook install` so the graph rebuilds after commits, checkouts, merges and rewrites.
