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 …

Functions in Go programming

Introduction In this tutorial, you’ll understand functions in Go programming. Basically, a function is a group of instructions with a name. And the name is actually optional, but it’s a bunch of instructions that are group together. as we’ll see step by step. The func main(). We’re defining a function …

Introduction to Struct in Go Programming

Introduction In this tutorial we’ll understand Struct in Golang, a Struct is another aggregate data type, another composite data type, as an aggregate type meaning groups together objects of arbitrary data types into one object. The struct is short for structure, by the way, this takes also straight from C. …

Introduction to Hash Table in Go Programming

Introduction A hash table is a data structure used in a lot of different languages, and it’s a very useful data structure, it allows you fast access to large bodies of data. Hash table generally contains a key-value pair, so there are a lot of values inside this hash table …

Garbage Collection In Go Programming

Introduction In this article we’ll understand garbage collection and deallocating memory, So it can be hard to determine Because it is appropriate to deallocate a variable. when you can only deallocate a variable when you know the variable is no longer in use. If you don’t want to deallocate a …