Skip to main content

How to Make HTTP Requests in Golang

In our previous tutorial, we have explained about Channels in Golang. In this tutorial, we will explain how to make HTTP Requests in Golang.

There are net/http package is available to make HTTP requests. We just need tp import the package in our script and can use GET, POST, PostForm HTTP functions to make requests.

So here in this tutorial we will explain how to make GET, POST, PostForm HTTP requests in Golang. (more…)

Concurrency with Goroutines in Golang

In our previous tutorial, we have explained how to work with Maps in Golang. In this tutorial, we will explain about Goroutines in Golang. Goroutines are functions in Golang that are run concurrently which means multiple operations can be handled at the same time. It’s about creating and executing multiple processes independently.

With Goroutines, we can easily convert sequential programs into concurrent program without having to worry about thread pools as the Golang creates very light-weight threads that’s managed by Go runtime. (more…)

Working with Maps in Golang

In our previous tutorial, we have explained how to handle Marshalling and Unmarshalling in Golang. In this tutorial, we will explain about Maps in Golang. Map in Golang is a data structure that provides an unordered collection of keys/values pairs. Golang maps are same like associative arrays, hash or dictionaries in other programming languages.

The maps are used to store and access values based on key. A key works like an index, pointing to the value associate with that key. A map data structure is used for fast lookup, retrieval and deletion of the data based on keys. (more…)

Marshalling and Unmarshalling in Golang

In this tutorial, we will explain how to encode and decode data in Golang. Data encoding is an important part of any programming language to encode data into JSON or decode data into String.

In Golang, struct data is converted into JSON and JSON data to string with Marshal() and Unmarshal() method. The methods returned data in byte format and we need to change returned data into JSON or String.

In our previous tutorial, we have explained about Parsing JSON Data in Golang. In this tutorial, we will explain about data marshal and unmarshal in Golang. (more…)

AWS S3 File Upload in Golang

AWS S3 or Amazon S3 is a storage system from Amazon to store and retrieve files from anywhere on the web. It is a highly scalable, reliable, fast, inexpensive data storage system from Amazon. It provides easy to use developer kit to store and retrieve files.

As in our previous Go tutorial, you have learned how to write data to CSV file in Golang. In this tutorial you will learn how to upload files to AWS S3 using Golang. We will use the Go AWS SDK to upload files to AWS S3. (more…)