Introduction
The previous chapter introduced you to basic debugging in Go. The more you develop code in Go, the better you get; however, developing and deploying code may come with corner cases that need to be debugged. The previous chapter showed you how to use the fmt
package, how to log in to files, and how to use printing verbs for string formatting.
This chapter is dedicated to teaching you all you need to know about handling variables that represent time data. You will learn how to do it the “Go way.” First, we will start out with basic time creation, timestamps, and more; then, we will learn how to compare and manipulate time, calculate the duration between two dates, and create timestamps. Finally, we will learn how to format time according to our needs. So, let’s not waste any more time and jump right in.