From fc06e553050f9a45829cdcde48931526ec7e79f8 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 18 Nov 2019 18:03:31 +0900 Subject: [PATCH] Add build constraints for non cgo --- backup.go | 2 +- backup_test.go | 4 ++++ callback.go | 2 +- callback_test.go | 7 +++++++ error.go | 2 +- error_test.go | 4 +++- sqlite3.go | 2 +- sqlite3_context.go | 2 +- sqlite3_go18.go | 2 +- sqlite3_go18_test.go | 4 ++-- sqlite3_libsqlite3.go | 2 +- sqlite3_load_extension.go | 2 +- sqlite3_load_extension_omit.go | 2 +- sqlite3_opt_allow_uri_authority.go | 2 +- sqlite3_opt_app_armor.go | 4 ++-- sqlite3_opt_foreign_keys.go | 2 +- sqlite3_opt_fts3_test.go | 4 +++- sqlite3_opt_fts5.go | 2 +- sqlite3_opt_icu.go | 2 +- sqlite3_opt_introspect.go | 2 +- sqlite3_opt_json1.go | 2 +- sqlite3_opt_preupdate.go | 4 +++- sqlite3_opt_preupdate_hook.go | 2 +- sqlite3_opt_preupdate_hook_test.go | 2 +- sqlite3_opt_preupdate_omit.go | 4 ++-- sqlite3_opt_secure_delete.go | 2 +- sqlite3_opt_secure_delete_fast.go | 2 +- sqlite3_opt_stat4.go | 2 +- sqlite3_opt_unlock_notify.go | 2 +- sqlite3_opt_unlock_notify_test.go | 2 +- sqlite3_opt_vacuum_full.go | 2 +- sqlite3_opt_vacuum_incr.go | 2 +- sqlite3_opt_vtable.go | 2 +- sqlite3_opt_vtable_test.go | 2 +- sqlite3_other.go | 2 +- sqlite3_solaris.go | 2 +- sqlite3_test.go | 4 +++- sqlite3_trace.go | 2 +- sqlite3_type.go | 5 +++++ sqlite3_windows.go | 2 +- static_mock.go | 5 +++++ 41 files changed, 69 insertions(+), 40 deletions(-) diff --git a/backup.go b/backup.go index 9754bfc9..e222cc88 100644 --- a/backup.go +++ b/backup.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/backup_test.go b/backup_test.go index 73c0a4b5..6d857de5 100644 --- a/backup_test.go +++ b/backup_test.go @@ -1,6 +1,10 @@ +// Copyright (C) 2019 Yasuhiro Matsumoto . +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +// +build cgo + package sqlite3 import ( diff --git a/callback.go b/callback.go index f7fe8d0f..64505751 100644 --- a/callback.go +++ b/callback.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/callback_test.go b/callback_test.go index 5c61f443..714ed607 100644 --- a/callback_test.go +++ b/callback_test.go @@ -1,3 +1,10 @@ +// Copyright (C) 2019 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + +// +build cgo + package sqlite3 import ( diff --git a/error.go b/error.go index 49ab8903..0c4992f2 100644 --- a/error.go +++ b/error.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/error_test.go b/error_test.go index 7fccd572..7cb33aed 100644 --- a/error_test.go +++ b/error_test.go @@ -1,8 +1,10 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +// +build cgo + package sqlite3 import ( diff --git a/sqlite3.go b/sqlite3.go index 9eec6360..053e92d3 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_context.go b/sqlite3_context.go index 78ced188..90800fee 100644 --- a/sqlite3_context.go +++ b/sqlite3_context.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_go18.go b/sqlite3_go18.go index 82b7fea0..bd97cb87 100644 --- a/sqlite3_go18.go +++ b/sqlite3_go18.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_go18_test.go b/sqlite3_go18_test.go index c9e79e7a..f295bb60 100644 --- a/sqlite3_go18_test.go +++ b/sqlite3_go18_test.go @@ -1,9 +1,9 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. -// +build go1.8 +// +build go1.8,cgo package sqlite3 diff --git a/sqlite3_libsqlite3.go b/sqlite3_libsqlite3.go index 9788f578..bd6de0bc 100644 --- a/sqlite3_libsqlite3.go +++ b/sqlite3_libsqlite3.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_load_extension.go b/sqlite3_load_extension.go index e73982ad..23c5d31c 100644 --- a/sqlite3_load_extension.go +++ b/sqlite3_load_extension.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_load_extension_omit.go b/sqlite3_load_extension_omit.go index 7ea32945..8c75f9bd 100644 --- a/sqlite3_load_extension_omit.go +++ b/sqlite3_load_extension_omit.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_allow_uri_authority.go b/sqlite3_opt_allow_uri_authority.go index c92e8177..8c4d4d20 100644 --- a/sqlite3_opt_allow_uri_authority.go +++ b/sqlite3_opt_allow_uri_authority.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_app_armor.go b/sqlite3_opt_app_armor.go index 89947cd2..63c80cfe 100644 --- a/sqlite3_opt_app_armor.go +++ b/sqlite3_opt_app_armor.go @@ -1,6 +1,6 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . - +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_foreign_keys.go b/sqlite3_opt_foreign_keys.go index fd4f5a77..a676e097 100644 --- a/sqlite3_opt_foreign_keys.go +++ b/sqlite3_opt_foreign_keys.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_fts3_test.go b/sqlite3_opt_fts3_test.go index e06fc5d1..ce44474c 100644 --- a/sqlite3_opt_fts3_test.go +++ b/sqlite3_opt_fts3_test.go @@ -1,8 +1,10 @@ -// Copyright (C) 2015 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +// +build cgo + package sqlite3 import ( diff --git a/sqlite3_opt_fts5.go b/sqlite3_opt_fts5.go index fa984009..0f38df75 100644 --- a/sqlite3_opt_fts5.go +++ b/sqlite3_opt_fts5.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_icu.go b/sqlite3_opt_icu.go index 000777f8..8257a75b 100644 --- a/sqlite3_opt_icu.go +++ b/sqlite3_opt_icu.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_introspect.go b/sqlite3_opt_introspect.go index 10d44339..6512b2b3 100644 --- a/sqlite3_opt_introspect.go +++ b/sqlite3_opt_introspect.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_json1.go b/sqlite3_opt_json1.go index 47d35998..7cfce763 100644 --- a/sqlite3_opt_json1.go +++ b/sqlite3_opt_json1.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_preupdate.go b/sqlite3_opt_preupdate.go index a1fe92dc..cea032e3 100644 --- a/sqlite3_opt_preupdate.go +++ b/sqlite3_opt_preupdate.go @@ -1,9 +1,11 @@ // Copyright (C) 2019 G.J.R. Timmer . // Copyright (C) 2018 segment.com - +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +// +build cgo + package sqlite3 // SQLitePreUpdateData represents all of the data available during a diff --git a/sqlite3_opt_preupdate_hook.go b/sqlite3_opt_preupdate_hook.go index 4ea56b96..db7a6662 100644 --- a/sqlite3_opt_preupdate_hook.go +++ b/sqlite3_opt_preupdate_hook.go @@ -1,6 +1,6 @@ // Copyright (C) 2019 G.J.R. Timmer . // Copyright (C) 2018 segment.com - +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_preupdate_hook_test.go b/sqlite3_opt_preupdate_hook_test.go index b75af0e5..20c87665 100644 --- a/sqlite3_opt_preupdate_hook_test.go +++ b/sqlite3_opt_preupdate_hook_test.go @@ -1,6 +1,6 @@ // Copyright (C) 2019 G.J.R. Timmer . // Copyright (C) 2018 segment.com - +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_preupdate_omit.go b/sqlite3_opt_preupdate_omit.go index fae96452..8df453de 100644 --- a/sqlite3_opt_preupdate_omit.go +++ b/sqlite3_opt_preupdate_omit.go @@ -1,10 +1,10 @@ // Copyright (C) 2019 G.J.R. Timmer . // Copyright (C) 2018 segment.com - +// // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. -// +build !sqlite_preupdate_hook +// +build !sqlite_preupdate_hook,cgo package sqlite3 diff --git a/sqlite3_opt_secure_delete.go b/sqlite3_opt_secure_delete.go index 0e2f280d..934fa6b8 100644 --- a/sqlite3_opt_secure_delete.go +++ b/sqlite3_opt_secure_delete.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_secure_delete_fast.go b/sqlite3_opt_secure_delete_fast.go index 8f86b21c..b0de130f 100644 --- a/sqlite3_opt_secure_delete_fast.go +++ b/sqlite3_opt_secure_delete_fast.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_stat4.go b/sqlite3_opt_stat4.go index 3a34c129..d4d30f0d 100644 --- a/sqlite3_opt_stat4.go +++ b/sqlite3_opt_stat4.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_unlock_notify.go b/sqlite3_opt_unlock_notify.go index 5dde027d..43f53e80 100644 --- a/sqlite3_opt_unlock_notify.go +++ b/sqlite3_opt_unlock_notify.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_unlock_notify_test.go b/sqlite3_opt_unlock_notify_test.go index 812c5430..95db9387 100644 --- a/sqlite3_opt_unlock_notify_test.go +++ b/sqlite3_opt_unlock_notify_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_vacuum_full.go b/sqlite3_opt_vacuum_full.go index a202c80d..5185a96d 100644 --- a/sqlite3_opt_vacuum_full.go +++ b/sqlite3_opt_vacuum_full.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_vacuum_incr.go b/sqlite3_opt_vacuum_incr.go index 62bbf506..a9d8a185 100644 --- a/sqlite3_opt_vacuum_incr.go +++ b/sqlite3_opt_vacuum_incr.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // Copyright (C) 2018 G.J.R. Timmer . // // Use of this source code is governed by an MIT-style diff --git a/sqlite3_opt_vtable.go b/sqlite3_opt_vtable.go index 73d66c00..50c94291 100644 --- a/sqlite3_opt_vtable.go +++ b/sqlite3_opt_vtable.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_opt_vtable_test.go b/sqlite3_opt_vtable_test.go index d196c756..b7382dba 100644 --- a/sqlite3_opt_vtable_test.go +++ b/sqlite3_opt_vtable_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_other.go b/sqlite3_other.go index 71778fc4..077d3c64 100644 --- a/sqlite3_other.go +++ b/sqlite3_other.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_solaris.go b/sqlite3_solaris.go index 40b2b2f0..102f90c9 100644 --- a/sqlite3_solaris.go +++ b/sqlite3_solaris.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_test.go b/sqlite3_test.go index 806ab8db..c8ef6d44 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -1,8 +1,10 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +// +build cgo + package sqlite3 import ( diff --git a/sqlite3_trace.go b/sqlite3_trace.go index 51cb22e6..2ebedef0 100644 --- a/sqlite3_trace.go +++ b/sqlite3_trace.go @@ -1,4 +1,4 @@ -// Copyright (C) 2016 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/sqlite3_type.go b/sqlite3_type.go index 200d071c..437bf0a4 100644 --- a/sqlite3_type.go +++ b/sqlite3_type.go @@ -1,3 +1,8 @@ +// Copyright (C) 2019 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + package sqlite3 /* diff --git a/sqlite3_windows.go b/sqlite3_windows.go index 4222e7f9..9df19614 100644 --- a/sqlite3_windows.go +++ b/sqlite3_windows.go @@ -1,4 +1,4 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . +// Copyright (C) 2019 Yasuhiro Matsumoto . // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/static_mock.go b/static_mock.go index 48629d18..33be130c 100644 --- a/static_mock.go +++ b/static_mock.go @@ -1,3 +1,8 @@ +// Copyright (C) 2019 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + // +build !cgo package sqlite3