Articles by Tuan Nguyen
[SOLVED] Define GO function with multiple types
We can either use an empty interface using interface{} or use generics to define golang function accept two types or multiple types as an input.
Golang power calculation using math.Pow() function
Calculate the power of integers and float number using math.pow() function and other possible methods.
Golang string interpolation Explained [With Examples]
The golang string interpolation can be done using different fmt packages such as Printf(), Sprintf(). Fprintf() and Errorf()
How to PROPERLY write multiline strings in GO?
How to declare golang multiline string. Declare a multiline string with and without special characters and escape characters used for new line or Tab delimiter. …
SOLVED: How to reverse sort slice of integer in GO
There are two methods to sort slice of integer in reverse or descending order. To sort in descending order, you have to implement the sort.Interface interface …
Golang Ticker loop to iterate over time.Tick channel
Execute a ticker in for loop and then stop the loop using stop() function. We can also break the ticker loop channel conditionally.
Golang Ticker Explained in Detail [With Examples]
golang ticker is used to perform any task at frequent intervals. golang time.Ticker is similar to time.Timer, but its channel delivers more elements at regular …
