From a1e0e680ad86788751e70a75b1d9cdc8c9eb4186 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sun, 27 Aug 2017 20:33:15 -0400 Subject: [PATCH] Constraint current implementation up to Go 1.8. This commit is in preparation of the following commit which will add support for Go 1.9. It constraints the current implementation (meant for Go 1.8) so that it will not be used in Go 1.9. A different implementation, located elsewhere will be used for Go 1.9. See next commit for details. --- .travis.yml | 23 ++++++++++------------- go16.go => go16-18.go | 2 +- match.go => match18.go | 2 ++ match_test.go => match18_test.go | 2 ++ 4 files changed, 15 insertions(+), 14 deletions(-) rename go16.go => go16-18.go (90%) rename match.go => match18.go (99%) rename match_test.go => match18_test.go (99%) diff --git a/.travis.yml b/.travis.yml index fcbc42c..a983ed3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,15 @@ -language: go sudo: false - -matrix: - include: - - go: 1.2 - - go: 1.3 - - go: 1.4 - - go: 1.5 - - go: 1.6 - - go: tip - +language: go +go: + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 install: - - # Skip - + - # Skip. script: - go get -t -v ./... - diff -u <(echo -n) <(gofmt -d .) diff --git a/go16.go b/go16-18.go similarity index 90% rename from go16.go rename to go16-18.go index 6a70285..f25cec1 100644 --- a/go16.go +++ b/go16-18.go @@ -1,4 +1,4 @@ -// +build go1.6 +// +build go1.6,!go1.9 package gotool diff --git a/match.go b/match18.go similarity index 99% rename from match.go rename to match18.go index 3edbb74..6d6b136 100644 --- a/match.go +++ b/match18.go @@ -26,6 +26,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +build !go1.9 + package gotool import ( diff --git a/match_test.go b/match18_test.go similarity index 99% rename from match_test.go rename to match18_test.go index 0e7eaf6..59112ac 100644 --- a/match_test.go +++ b/match18_test.go @@ -26,6 +26,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +build !go1.9 + package gotool import (