Practical Persistence in Go: SQL Databases
alexedwards.net
alexedwards.net
This will send the sql error directly to the client. I don't think it's a good idea because it can leak important information to it; it's better to log this error on the server and send back a generic failure message to the client.