Go theorytheory 0/50 · 0%
Types · easy

13. Interfaces

Implicit, small and satisfied by behaviour.

An interface lists method signatures; any type with those methods satisfies it implicitly — no declaration needed. Small interfaces such as io.Reader compose well. Accept interfaces and return concrete types is the common design guidance.

Check your understanding

  1. 1. How does a type implement an interface?

  2. 2. Idiomatic Go interfaces are…