Better Time Format in Completion
Use the commonly known date/time formatting strings while writing time formatting in Go.
It's no secret that Go uses different references for formatting date/time. When coming from other programming languages, you may try to use YYYY instead of Go's 2006 string to format the year. This is where GoLand can help you by suggesting the common date/time formats, such as YYYY or DD and converting them to Go's formatting directives.
Start typing any common date/time formatting strings, such as YYYY or DD and the IDE will convert them automatically. You can also use other identifiers, such as year or day, to activate this feature. This works for both time.Time.Format
and time.Parse
functions.