When you have an io.Reader , the most common way to read is with ioutil.ReadAll but it is not the best and most efficient way.

So here are three functions to compare the different methods to unmarshal JSON from an io.Reader

func IOUtilReadAll(reader io.Reader) (map[string]interface{}, error) {…

Have you ever wonder if you are concatenating strings efficiently? I did, and so here are the results.

But first, let’s discuss on three ways to concatenate strings.

1. Concatenation using +

The easiest and cleanest way to concatenate strings is to use + .

foobar := "foo" + "bar"

2. Concatenation using strings.Builder

Another way is with…

Speed to market is the key to success and is possible with serverless backend. With serverless technologies, you will not need to worry about managing your servers. You will be able to dive straight into implementation.

Most cloud providers support Function as a Service, or FaaS, and it allows you…

Daryl Ng

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