Make Go 1.7 fail compilation

The package is useless without cgo, but Go 1.7 will happily build it
since doc.go is a pure-Go file, even if CGO_ENABLED=0, like when
cross-compiling.

This is particularly problematic since the package is usually imported
for its side effects, and users would successfully build a broken binary.

Workaround golang/go#16981
This commit is contained in:
Filippo Valsorda 2016-09-03 20:02:56 +01:00
parent b5c99a7203
commit 98981b4a3b
1 changed files with 2 additions and 0 deletions

2
doc.go
View File

@ -110,3 +110,5 @@ See the documentation of RegisterFunc for more details.
*/ */
package sqlite3 package sqlite3
import "C"