Continue if you are a beginner in Go

Generally Go is perfect for building micro services, but it doesn’t mean that trivial MVC app are not easy to build. Go has built-in support for parsing html template, though we are not going to focus on that.

First of all let’s write our go code for serving a html…

Validate Go request data with simple rules and an easy way!

When building REST API or web applications using Go, an essential part is to validate the incoming request data.

I have worked in some small and medium project in Golang, most of them are micro-services, providing restful api. I have used different ways to validate incoming data. …

Make your app concurrent using goroutine and channel

Goroutine

Goroutine works like the thread in java or any other multi-threading programming language, though the internal concept is different. Goroutine is more lightweight than processor thread. It takes little memory (on average 4~8 KB) than regular thread. Goroutines are managed by thread manager in runtime.

Let’s have a look to…

Defer statement defers the execution of a function until the surrounding function returns. Multiple defers are pushed into stack and executes in Last In First Out (LIFO) order. Defer generally used to cleanup resources like file, database connection etc. Lets see the example below:

As we…

Start to write your own Microservices today!

Today I’m going to build a simple API for todo application with the golang programming language. I’m going to use golang simplest/fastest framework gin-gonic and a beautiful ORM gorm for our database work. To install these packages go to your workspace $GOPATH/src and run these command below:

$ go get…

Saddam H

Software Engineer, Pathao Inc | Open Source Enthusiast | Love to write elegant code | Gopher by passion | https://thedevsaddam.github.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store