Eli Bendersky 35ad9cc35c Add example of struct embedding in Go
Also mention implementing interfaces with embedding

Fixes #381
Fixes #398
2021-11-22 12:48:11 -08:00

6 lines
115 B
Bash

$ go run embedding.go
co={num: 1, str: some name}
also num: 1
describe: base with num=1
describer: base with num=1