does not implement interface (missing method) Go Origin: Application & API OSI layer 7 · Application Last updated 4 Nov 2026

Go: cannot use &Dog{} (value of type *Dog) as Animal value: *Dog does not implement Animal (missing method Speak)

A type was used as an interface but lacks a method or has it with a different signature or receiver type.

Exact message you may see does not implement (missing method)*Dog does not implement Animal (missing method Speak)Dog does not implement Animal (method Speak has pointer receiver)wrong type for methodcannot use value as interface value
Seen on: Go

Meaning

Check the method name, signature and receiver. A method with a pointer receiver belongs to *T, not T, so T does not satisfy the interface. The compiler lists the missing or wrong-type method.

Common causes

  • Method missing or misspelled
  • Pointer receiver method, value type used
  • Different parameter/return types
  • Unexported method from another package
  • Embedded type not promoted as expected

⚡ Quick fix

  1. Implement the missing method with the exact signature
  2. Use a pointer (&T{}) when methods have pointer receivers
  3. Add var _ Animal = (*Dog)(nil) as a compile-time check

Detailed fix by platform

Go

  1. var _ Animal = (*Dog)(nil) fails at compile time with a precise message

How to diagnose

  1. Method — Which is missing?
  2. Receiver — Pointer or value?
  3. Signature — Matches?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

assignment mismatch: 1 variable but f returns 2 values — Go: assignment mismatch: 1 variable but os.Open returns 2 values (Go)assignment mismatch: …cannot assign to struct field m[k].f in map — Go: cannot assign to struct field users["bob"].Age in map (Go)cannot assign to stru…cannot use x as type in assignment/argument — Go: cannot use "5" (untyped string constant) as int value in argument to f (Go)cannot use x as type …function main is undeclared in the main package — Go: runtime.main_main·f: function main is undeclared in the main package (Go)function main is unde…import cycle not allowed — Go: package app/models imports app/utils imports app/models: import cycle not allowed (Go)import cycle not allo…imported and not used — Go: ./main.go:5:2: "os" imported and not used (Go)imported and not usedinvalid operation: mismatched types — Go: invalid operation: a + b (mismatched types int and float64) (Go)invalid operation: mi…missing return — Go: ./main.go:18:1: missing return (Go)missing returndoes not …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.