I'm running into the most bizarre issue regarding datestring parsing in golang using the time package.
The Error:
parsing time "07-20-2018" as "2006-01-02": cannot parse "0-2018" as "2006"
The Code Block:
log.Println(datestring) //07-20-2018
date, err := time.Parse("2006-01-02", datestring)
log.Println(err) //parsing time "07-20-2018" as "2006-01-02": cannot parse "0-2018" as "2006"
log.Println(date) //parsing time "07-20-2018" as "2006-01-02": cannot parse "0-2018" as "2006"
I'm completely at a loss to what this issue is referring to, the string is parsed from the URI in golang with gorilla mux.
datestring, _ := vars["date"] //some/path/{date}, date is 07-20-2018
Any ideas?