Why Go Interfaces Are Implicitly Satisfied (No implements Keyword)

Go interfaces are implicitly satisfied when a type defines all required methods, eliminating the need for an explicit implements keyword.

Go interfaces are implicitly satisfied because the compiler checks if a type has all the methods defined in the interface at compile time, rather than requiring an explicit declaration. If a type implements the required methods, it automatically satisfies the interface without any extra syntax.

type Reader struct{}

// No 'implements io.Reader' keyword needed.
// Satisfies interface because Read method exists.
func (r *Reader) Read(p []byte) (n int, err error) {
    return 0, nil
}

// Usage: The compiler verifies satisfaction here.
var _ io.Reader = &Reader{}