Skip to content

Commit

Permalink
Make Go 1.7 fail compilation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
FiloSottile committed Sep 3, 2016
1 parent b5c99a7 commit 98981b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ See the documentation of RegisterFunc for more details.
*/
package sqlite3

import "C"

0 comments on commit 98981b4

Please sign in to comment.