[Go] Define an interface

Created on November 30, 2026

Use type and interface to declare a named interface. Put its method specifications inside the braces.

type InterfaceName interface {
  ...
}

This example defines an empty interface named Dog.

type Dog interface {
}
Go