Context in Golang

The Context package defines an API that provides support for deadlines, cancelation signals, and request-scoped values that can be passed across API boundaries to all the goroutines involved in handling a request. This API is an essential part of any application you will write in Go. This article describes how to use the package and provides a complete working example. In a Go implementation, we use goroutines to execute other functions inside the main function to run in the background simultaneously....

September 8, 2020 · 7 min · 1337 words · Me

How to use JSON with Golang(Go)

Javascript Object Notation known as JSON, is the universally accepted format to exchange data. It is the lightweight for storing and transferring the data across devices or medium. Stating the definition as json.org says, JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language....

June 28, 2020 · 4 min · 847 words · Me