mirror of https://github.com/mattn/go-sqlite3.git
1e5b7497ff
Note that you can't call cgo from within a test file; so in order to test the functionality, create new package, .../internal/sqlite3test, to define the callback. Then in the main sqlite3 package, add a test file which includes this package and calls the callback. As with the previous commit, the idea and the basic code was written by @rittneje; I massaged it so that it compiled and passed with Go 1.9, and wrote this commit message and the comments. NB that Golang 1.9 doesn't have sql.OpenDB, so we have to register a new database driver. Signed-off-by: George Dunlap <dunlapg@umich.edu> v4: - Refactor to get rid of sql.OpenDB call, which only appeared in Go 1.10 v3: - New |
||
---|---|---|
.. | ||
raw.go |