Plug machines into Pak Sapto's board with real Go: interfaces, pointer receivers, errors. 15 levels, played right in the browser with nothing to install.
An interface in Go is a list of methods. A type satisfies the interface when it has all of them, without saying so. In Pak Sapto's workshop an interface is a socket on the board and each method is a hole. A machine goes in when its plug has a pin for every hole. The program is built and run by real Go 1.27, so even its error messages are Go's own.
A receiver can be a value (func (r Radio)) or a pointer (func (r *Radio)). A pointer receiver is used when the method has to change what it holds. The rule: the method set of Radio holds only value-receiver methods, while the method set of *Radio holds both. An interface checks that method set.
any is an interface with no methods, so every type satisfies it. To use what is inside, ask for its type with a type switch: one type per case, and inside it the variable already has that type.
A type assertion x.(T) takes a value of type T out of an interface. The two-value form, v, ok := x.(T), never panics: ok tells whether it worked. T may be another interface: that asks whether the value has that interface's methods too.
The fmt package defines a small interface, Stringer: String() string. Any value with that method is printed through it by Println, Printf("%v") and their friends.
A struct can embed another type: the type is written in the field list with no field name. The fields and methods of the embedded type are promoted to the outer struct, also for satisfying interfaces.