Skip to main content

Regular Expressions in Golang

In our previous Golang tutorial, we have explained how to create REST API in Golang. In this tutorial, we will explain how to work with regular expressions in Golang.

A regular expression or regex is a sequence of characters to define a search pattern. It’a powerful technique used in most of programming language. Instead of writing many code lines, regex provides fast solution to handle everything in a single line of code to search, replace, extract, pattern matching etc. (more…)

Creating REST API with Golang

In our previous tutorial, we have explained how to Delete Files in Golang. In this tutorial, we will explain how to create REST API in Golang.

REST (Representational State Transfer) is the most used interface to populate the dynamic data and perform operations such as add, update and delete in web applications. The REST APIs are used in all kinds applications to make GET, POST, PUT or DELETE HTTP requests to perform CRUD operations on data.

In this tutorial, we are going to explain to create simple REST API with Golang to perform GET, POST, DELETE and PUT on dynamic data. We will mainly focus on the basic concepts of this, so we will perform actions on employee JSON data instead of database. So you can use this by connection with database as per your application requirement. (more…)

Working with Structs in Golang

In our previous tutorial, we have explained to work with Date and Time in Golang. In this tutorial, we will explain how to work with Structs in Golang.

Structs in Golang is a ability to create user-defined data type from group of data fields with different data types. The data field in a struct can be declared with built-in or user-defined data types.

The concept of struct can be compared with the object-oriented programming which supports composition but not inheritance. (more…)

Working with Date and Time in Golang

In our previous tutorial, we have explained How to Make HTTP Requests in Golang. In this tutorial, we will explain how to work with Date and Time in Golang.

Date and Time is a common functionality in web applications to display dates in different formats according to requirement. Sometimes we need to get current timestamp or sometimes need to convert timestamp into human readable date time format. In Golang, we can use Time package to handle date time functionality. (more…)

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…)