Golang time.Time.IsZero() function example
package time
Golang time.Time.IsZero() function usage example.
modtime time.Time
...
if modtime.IsZero() {
fmt.Println("Time is January 1, year 1, 00:00:00 UTC")
}
Reference :
Advertisement
Something interesting
Tutorials
+6.3k Golang : How to search a list of records or data structures
+36.7k Golang : Display float in 2 decimal points and rounding up or down
+87.7k Golang : How to convert character to ASCII and back
+9k Golang : Go as a script or running go with shebang/hashbang style
+5.8k Golang : Launching your executable inside a console under Linux
+11.9k Golang : Setup API server or gateway with Caddy and http.ListenAndServe() function example
+11.3k Golang : How to flush a channel before the end of program?
+6.1k Golang : Scan forex opportunities by Bollinger bands
+22.1k Golang : Match strings by wildcard patterns with filepath.Match() function
+4.7k JavaScript: Add marker function on Google Map
+10.6k Golang : How to unmarshal JSON inner/nested value and assign to specific struct?