time.Time.Equal() Function in Golang With Examples
In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Equal() function in Go language is used to check if the stated times “t” and “u” represents identical time instant or not. And two times located in different locations can even be equal. Moreover, this function is defined under the time package. Here, you need to import the “time” package in order to use these functions.
func (t Time) Equal(u Time) bool
Here, “t” and “u” are the stated time.
Return Value: It returns true if the stated times are equal else it returns false.