Avoid custom time format

Metadata

ID: go-best-practices/time-parse-format

Language: Go

Severity: Info

Category: Best Practices

Description

Make sure your code use a valid time format. See the official Go documentation for the valid time format.

Non-Compliant Code Examples

func main() {
    time.Parse("foobar", something)
}

Compliant Code Examples

func main() {
    time.Parse(time.ANSIC, something)
}