From 98981b4a3bc61c9f76cd54c691f1262041973c3e Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sat, 3 Sep 2016 20:02:56 +0100 Subject: [PATCH] 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 --- doc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc.go b/doc.go index c721f770..030cd93a 100644 --- a/doc.go +++ b/doc.go @@ -110,3 +110,5 @@ See the documentation of RegisterFunc for more details. */ package sqlite3 + +import "C"