package main import ( "fmt" "time" ) func main() { t := time.Now() fmt.Println(t.Format("Monday, January 02, 2006")) fmt.Println(t.Format("15:04:05")) fmt.Println(t.Format("2006-01-02T15:04:05.999999-07:00")) }In the above example, we are formatting the current time in different formats. The first format outputs the date in a human-readable form, the second formats the time in hours, minutes, and seconds, and the third formats the date and time in ISO8601 format. The Go time package library.