Skip to content

Instantly share code, notes, and snippets.

View cclintris's full-sized avatar

Tristan Lin cclintris

View GitHub Profile

[Golang pkg]: A top to bottom view of Context

Intro

As a newbie to Golang, I decided to restart the habit of writing tech blogs, one to give me a better chance to pick up Golang faster, but most importantly, try to elevate my abilities as an engineer again, thoroughly.

Let's cut to the chase, today the topic is the Context package. After reading some materials online, I think it's best to start from basic usages of Context, and then dig deeper to the source code level.

Okay let's start! I'm sure you would often see code like this:

[Golang]: map[string]interface{} in Go

Intro

I'm sure no matter what level you are when it comes to using Go, you would see the code snippet map[string]interface{} so often that you might even wonder if it's some kind of syntax sugar in Go. Well it's not.

So what is a map[string]interface{} in Go, and why is it so useful? If you have the same confusion like I did, let's find out by reading this article!

Golang map[string]interface{} example