Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I was hoping for concrete suggestions for how to achieve the behavior you are suggesting. Are there any common design patterns that can be applied to my case, for example? Commented Mar 25, 2015 at 16:02
  • 1
    @blz Consider using Ping() from the database/sql package: golang.org/pkg/database/sql/#DB.Ping. For instance, you could start a goroutine in your Init() method to periodically ping the db and reform the connection when it comes back. Commented Mar 25, 2015 at 23:44