Creating a simple REST API using GO-Lang using framework Gin-Gonic.
If we want to have a look at how to build traditional web applications and micro-services in Go language, then there is a framework commonly used named as Gin framework. It is a framework that reduces boilerplate code that would normally go into building these applications. One of library we have in GO language for creating an HTTP server is net/http using which we can easily create a HTTP server. but the point to consider here is that it is not so flexible and it requires some boilerplate code to implement. Therefore Gin comes into the play. It has those commonly used functionalities, e.g. routing, middleware support, rendering, that reduce boilerplate code and make writing web applications simpler.
It is a high-performance micro-framework that can be used to build web applications and micro-services. Moreover we can say that it's a GO equivalent of Flask that is used in Python.
For implementing and following this REST API tutorial, one must have Go and Git installed on his local machine. Moreover to install the Gin library one must follow the instruction;
go get -u github.com/gin-gonic/gin
go run helloworld.go