title: Better/shorter way to close database connection in Go
body: <p>Usually I write something like this</p>
  
  <pre><code>rows := db.MyPgConn.QueryRows(`SELECT * FROM bla`) // or any other query
  for rows.Next() { // if there are result
     // rows.Scan( 
     // do custom operation
  }
  rows.Close() // close recordset
  </code></pre>
  
  <p>But that way, there are possibility that I forgot to write <code>rows.Close()</code> just like this <a href="http://golang.org/src/database/sql/sql.go?s=26261:26323#L991" rel="nofollow">code</a> that could make the number of available connection/socket depleted, is there better way to do this?</p>