From 6eb2824303bb02839b0d58053d0bd23c3c37d2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Fri, 15 Jun 2018 11:27:28 +0200 Subject: [PATCH 1/2] Rename go version dependent sources using idiomatic naming The Go toolchain has special support for build tags for Go versions in source filenames. https://golang.org/pkg/go/build/#hdr-Build_Constraints This makes build tags redundant, so they are removed. --- benchmark_go18_test.go => benchmark_go1.8_test.go | 2 -- connection_go18.go => connection_go1.8.go | 2 -- connection_go18_test.go => connection_go1.8_test.go | 2 -- driver_go18_test.go => driver_go1.8_test.go | 2 -- utils_go17.go => utils_go1.7.go | 0 utils_go18.go => utils_go1.8.go | 2 -- utils_go18_test.go => utils_go1.8_test.go | 2 -- 7 files changed, 12 deletions(-) rename benchmark_go18_test.go => benchmark_go1.8_test.go (99%) rename connection_go18.go => connection_go1.8.go (99%) rename connection_go18_test.go => connection_go1.8_test.go (97%) rename driver_go18_test.go => driver_go1.8_test.go (99%) rename utils_go17.go => utils_go1.7.go (100%) rename utils_go18.go => utils_go1.8.go (98%) rename utils_go18_test.go => utils_go1.8_test.go (98%) diff --git a/benchmark_go18_test.go b/benchmark_go1.8_test.go similarity index 99% rename from benchmark_go18_test.go rename to benchmark_go1.8_test.go index d6a7e9d6e..b747508b7 100644 --- a/benchmark_go18_test.go +++ b/benchmark_go1.8_test.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( diff --git a/connection_go18.go b/connection_go1.8.go similarity index 99% rename from connection_go18.go rename to connection_go1.8.go index 62796bfce..0a5019868 100644 --- a/connection_go18.go +++ b/connection_go1.8.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( diff --git a/connection_go18_test.go b/connection_go1.8_test.go similarity index 97% rename from connection_go18_test.go rename to connection_go1.8_test.go index 2719ab3b7..bd5bcfd20 100644 --- a/connection_go18_test.go +++ b/connection_go1.8_test.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( diff --git a/driver_go18_test.go b/driver_go1.8_test.go similarity index 99% rename from driver_go18_test.go rename to driver_go1.8_test.go index 005e76204..1fdfd1ed8 100644 --- a/driver_go18_test.go +++ b/driver_go1.8_test.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( diff --git a/utils_go17.go b/utils_go1.7.go similarity index 100% rename from utils_go17.go rename to utils_go1.7.go diff --git a/utils_go18.go b/utils_go1.8.go similarity index 98% rename from utils_go18.go rename to utils_go1.8.go index c35c2a6aa..d60743e71 100644 --- a/utils_go18.go +++ b/utils_go1.8.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( diff --git a/utils_go18_test.go b/utils_go1.8_test.go similarity index 98% rename from utils_go18_test.go rename to utils_go1.8_test.go index f63dbecc4..51df4dce7 100644 --- a/utils_go18_test.go +++ b/utils_go1.8_test.go @@ -6,8 +6,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. -// +build go1.8 - package mysql import ( From 220884f2bdf3d73fa3cfe0d254e123dd355eaf2b Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Sat, 16 Jun 2018 21:30:06 +0900 Subject: [PATCH 2/2] Remove Go 1.7 from travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc1268c36..47dd289a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ sudo: false language: go go: - - 1.7.x - 1.8.x - 1.9.x - 1.10.x