When you look at the context, you can embed a pointer to a parent context into a child struct’s context
- Struct combines the interface Context, representing the subtype that implements the interface Context
- Assign a pointer to Context’s implementation type. Son.context can be used to get a pointer to Father
Someone tried it in the reference article, and that’s how it works
A golang struct embedded in an interface