Question: how to calculate time difference in golang?
Answer: Sub() to get the difference between two time. Time values, the result that we get is time. Duration which is an float64. If you want the result in minutes or hours, you can use Minutes() or Hours() instead of Seconds().