- Inheritance:
- Go doesn't have language support for Inheritance, like the popular "extends" keyword from lang like java
- But we can simulate the effect by using composition
- The sample of inheritance and embedding can be found here
- Encapsulation:
- Again, go doesn't have special keyword like private, protected etc, like in java/c++
- But you can use the Go's visibility feature i.e using Small letters to hide the functions / variables