How to Set Hour and Minute for a Golang Time
Yes, sometimes we are surprised by Golang standard library! There is no method on time package that helps you to set (update) the hour, minute,… Read More »How to Set Hour and Minute for a Golang Time
Yes, sometimes we are surprised by Golang standard library! There is no method on time package that helps you to set (update) the hour, minute,… Read More »How to Set Hour and Minute for a Golang Time
If you are in a funny situation where you have to run a specific migration file on your Ruby on Rails project then this command… Read More »Rails Run or Redo Specific Migration
If you just need to have a minimal version of ruby on rails for your new project you are on the right page 🙂 Use… Read More »Rails: How to Start a New Minimal + API-Only Project?
There is a super easy trick to format a number with thousand separator in any language.
fmt package is magic! I love it and you can use it to simplify many tasks especially the debugging process 🙂 Take a look at… Read More »Go: The Simplest Way to Dump complex Variables for Debugging
Technically what we’re making here is a slice with a defined length. It’s not possible to make an array in Go with a non constant… Read More »How to make a 2D or 3D array in Go
In Golang, there is no function to generate random numbers over a range! Writing a random generator function is easy and I wrote one for… Read More »How to Generate a Random Int Over a Range (func)
Oh we know the input format and we want to extract data from some exact position of that, Scanf from fmt package will help us:… Read More »Take a Formatted User Input in Golang (Extract Data)
You need to accept multiple inputs (with different types) from a user and all of them are in one line! Scanln from the fmt package… Read More »Go: How to Take Multiple User Inputs From One Line
Time package has a helper method to check a time.Time variable is zero value or not: Run this simple example to check how it works: