title: go-mssql set connection timeout
body: <p>I'm having issues setting the timeout in go-mssqldb</p>
  
  <p>This is my current connection string:</p>
  
  <pre><code>sqlserver://user:password@server?timeout=1m30s
  </code></pre>
  
  <p>I can connect just fine, run queries etc. but I keep timing out at the default value of 30 seconds.
  I'm referencing the documentation <a href="https://github.com/denisenkom/go-mssqldb" rel="nofollow noreferrer">here</a>.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>import (
      "database/sql"
      _ "github.com/denisenkom/go-mssqldb"
  )
  
  func main(){
      db, err := sql.Open("mssql", "sqlserver://user:password@server?timeout=1m30s")
      if err != nil{
          panic(err)
      }
  
      _, err = db.Exec("run query that takes longer than 30 seconds")
      if err != nil{
           panic(err)
      }
      // panic at 30 seconds...
      // panic: read tcp {my ip}-&gt;{server ip}: i/o timeout
  
  }
  </code></pre>