Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 563 Bytes

interview.md

File metadata and controls

11 lines (9 loc) · 563 Bytes

Collection of standard Go questions that you can expect in an interview

How to OOP in go ?

  • 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