Every day, we build a lot of docker images. You know everything; still, I listed some best practices for optimizing docker build that I follow in day-to-day development. By the way, many best practices are already mentioned on the Docker website. I will share what I do for Golang docker image building. It’s applicable almost …
GO
Inspect HTTP Request and Response in Golang
Golang is getting popular for writing a web applications. One of the core concepts of this web application is handling requests and responses. In Golang, net/http package from the standard library provides all HTTP requests and responses mechanisms. As a developer, you often print this HTTP request or the response for debug purposes. net/http/httputil package …
Build SQL update query for HTTP Patch request in Golang
It seems pretty straightforward to implement HTTP Patch request. The handler receives the request, unmarshals the body, validates the payload, sanitizes it and then sends it to persist layer for persisting into the Database. Let’s look into an example. For example, we are updating a user resource. type UserResource struct { FirstName string `json:”first_name,omitempty” db:”first_name”` …
Getting started with Go with the GVM and some other important tools
Yeah.. I have to switch to GO AKA Golang to write a little app for solving a scalability issue. Go has some advantages such as very quickly compile, concurrency, garbage collector and functions as first class object. Whatever, today I am writing not to introduce the language rather installing the latest stable version without any …