How to use goroutine return value? [SOLVED]
By Tuan Nguyen
In this tutorial, we will try to catch return values from goroutines. Fetching the return value from a function and running a goroutine (asynchronously) are ...
By Tuan Nguyen
In this tutorial, we will try to catch return values from goroutines. Fetching the return value from a function and running a goroutine (asynchronously) are ...
By Tuan Nguyen
In today's article, I will guide you on how to stop a goroutine in Golang. A goroutine is a very lightweight thread that is managed ...
By Tuan Nguyen
In Golang, it is very simple to convert an int to int64. In today's post, we will show you some simple examples of converting an ...
By Tuan Nguyen
In Golang, iterating over a slice is surprisingly straightforward; In this article, we will learn how to iterate over a slice in reverse in Go. ...
By Tuan Nguyen
In this tutorial, we will try to implement some algorithms to search for an element in a slice. Go before version 1.18 does not provide ...
By Tuan Nguyen
In this tutorial, we will learn how to write logs to file in Golang. We have several ways to save the application log to specific ...
By Tuan Nguyen
In the previous post, we already discussed some examples of working with logrus in Golang. In today's post, we will show you how to include ...
By Tuan Nguyen
Introduction In this tutorial, we will try to get Unix time in milliseconds from a time.Time in Golang. The built-in time package provides some functions ...
By Tuan Nguyen
In this tutorial, we will guide you on how to handle defer calls with the os.Exit(). The defer keyword in Go is a statement used ...
By Tuan Nguyen
How padding works in Golang? We can use golang fmt.Printf in-built function to perform golang formatting. To format a string we will use %s while ...
By Tuan Nguyen
When building an HTTP server and client, we might need to pass multiple strings as parameters to an HTTP URL. In this tutorial, we will ...
By Tuan Nguyen
In this tutorial, we will show you how to import a package on a specific version. Your code may occasionally require extra functions not available ...
By Tuan Nguyen
Introduction In this tutorial, we will explain some methods to set timeout for HTTP requests. A Request Timeout header is defined for Hypertext Transfer Protocol ...