title: Unable to open SQLite database in golang: "unable to open database file [recovered]"-error
body: <p>I am just starting learning golang and am not sure if my error is conceptual or with the language. </p>
  
  <p>It is peculiar, because the error only occurs, when unit-testing my code. If I "go run" everything works fine. As a sqlite-driver I use <a href="http://github.com/mattn/go-sqlite3" rel="nofollow noreferrer">mattn/go-sqlite3</a>.</p>
  
  <p>Here is where the problem occurs:</p>
  
  <pre><code>    func dbExec(command *string) {
      db, err := sql.Open("sqlite3", dbPath) // Path and driver are set correcrtly
      defer db.Close()
      if err != nil { //No problem here
          panic(err)
      }
      _, err = db.Exec(*command)
      if err != nil { //Here the errorNo14 "Unable to open the database file" occurs
          panic(err)
      }
   }
  </code></pre>
  
  <p>So it seems to me, that the database file can be found, but it can't be open because of other limits. I have no concurrency in all of my code. I have only one test-method so far, so even if the testing would be done concurrently, it would so far be only one thread. Maybe someone has an idea! The problem seems to basic, there really is not much more to my code then this.</p>