How do I get yesterday's date in the time.Time struct in Go?
Here's one way with AddDate:
time.Now().AddDate(0, 0, -1)
The original answer also had a time.Add suggestion:
See Vatine's comment for reasons to prefer AddDate.