In this post, we will see here how we can use the switch statement in the Golang. This allows you to conduct various actions in Golang based on various situations. If/else logic can also be expressed with a switch without an expression.
Continue readingCategory Archives: golang tutorial
How to Generate Random Number Slice in Golang
This tutorial lets you know, How to generate a random number using Golang slices. I will use a time package to generate a random number and store them into slices using the UNIX timestamp.
Continue readingGolang MVC Project Structure without Any Framework
This Golang tutorial help to create MVC architecture for your golang project. There are a lot of go frameworks available that follow MVC architecture, but here we will create MVC based go project without any Golang framework, We will use core Golang to create structure.
Continue readingSimple Bubble Sort with Time Complexity In Golang
This tutorial helps to create bubble sort in golang, The bubble sort help to sort the elements using the comparison between the current node with the immediate next node, based on condition.
Continue readingWorking with Go String Using Example
This tutorial help to explore go string method. We will create a simple example to understand go string method with the example.
We will create a string and manipulate using string go method. The strings functions are stored into standard library “strings” package.A string is a read-only slice of bytes. You can get more information from Official Docs.
Continue readingMarshal and unMarshal of Struct to JSON in Golang
This Golang tutorial help to understand marshalling and un-marshalling of data using Golang. We can encode and decode struct data using marshal and unmarshal.
Continue reading