Golang provides encapsulation at the package level. Go doesn’t have any public, private or protected keyword. The only mechanism to control the visibility is using the capitalized and non-capitalized formats Capitalized Identifiers…
Tag: oop
Compile Time Polymorphism in Go (Golang)
In compile-time polymorphism, the call is resolved during compile time by the compiler. Some of the forms for compile-time polymorphism are Method/Function Overloading: more than one method/function exists with the same name but…
OOP: Inheritance in GOLANG complete guide
We will try to explain inheritance in GO using comparisons with inheritance in JAVA. The first thing we want to mention here is that GOLANG doesn’t have keywords such as “Extends” and…
Abstract Class in GO: Complete Guide
Go Interface doesn’t have fields and also it doesn’t allow the definition of methods inside it. Any type needs to implements all methods of interface to become of that interface type. There…