Interfaces and Error Handling in Go Programming

Introduction The interface is a concept used in Golang and it helps us get polymorphisms. So we don’t get the inheritance, we don’t need inheritance, we don’t need overriding. We can use interfaces to do the same thing. The interface is a set of method signatures. So by signatures, It …

Introduction to Encapsulation and Polymorphism in Golang

Introduction Encapsulation The encapsulation provides a lot of different support for encapsulation and keeping private data. But you want to be able to have controlled access to the data. So typically, even if you have private data in some package, you probably don’t want to hide it completely. but you …