Tag Archives: Golang

golang: Calculate 30 days before H-1 Day From Today

Case: You want to make a report for your boss. And you make a simple reporting graphics. The data is H-1 from today and 30 days from H-1 day and make cool graphic chart from it. Resolution: package mainimport ( "fmt" "time")func main() { today := time.Now() fmt.Println("Today is : …

Read More »

How to Update Go Version

If you are upgrading from an older version of Go you must first remove the existing version. Following is curated options to update Go to latest version. You can refer to Go official download page to get the latest version. Linux System: Debian/Ubuntu/Fedora. Might work for others as well. 1. …

Read More »

How to Route Multi URL with Same Prefix Using Gin

Gin (Gin-Gonic) is a powerful HTTP web framework. It is famous among Golang Developers. Let’s say you want to route some microservice hosted in your site using prefix url, i.e: yoursite.com/myservice this simple code that use Gin will make your life easier. Using RouterGroup feature you can navigate URL with …

Read More »