From 53358eb4a434be8293a2bc1a06acddab06e91547 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw <kenneth.shaw@knq.io> Date: Sun, 26 Jun 2016 15:18:08 +0700 Subject: [PATCH] Fixing go1.7 compatability issues (#122) --- .travis.yml | 2 +- vendor/github.com/zond/gotomic/list.go | 8 ++++---- vendor/github.com/zond/gotomic/stm.go | 10 +++++----- vendor/vendor.json | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index f50abfab..9e991cb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - 1.6 -# - tip # broken for 1.7 + - tip sudo: false #notifications: # slack: diff --git a/vendor/github.com/zond/gotomic/list.go b/vendor/github.com/zond/gotomic/list.go index 63f9fe6c..6505f497 100644 --- a/vendor/github.com/zond/gotomic/list.go +++ b/vendor/github.com/zond/gotomic/list.go @@ -67,7 +67,7 @@ func (self *List) Pop() (rval Thing, ok bool) { /* Each will run i on each element. - + It returns true if the iteration was interrupted. This is the case when one of the ListIterator calls returned true, indicating the iteration should be stopped. @@ -113,8 +113,8 @@ type element struct { /* The next element in the list. If this pointer has the deleted flag set it means THIS element, not the next one, is deleted. */ - unsafe.Pointer - value Thing + Pointer unsafe.Pointer + value Thing } func (self *element) next() *element { @@ -122,7 +122,7 @@ func (self *element) next() *element { for next != nil { nextElement := (*element)(next) /* - If our next element contains &deletedElement that means WE are deleted, and + If our next element contains &deletedElement that means WE are deleted, and we can just return the next-next element. It will make it impossible to add stuff to us, since we will always lie about our next(), but then again, deleted elements shouldn't get new children anyway. diff --git a/vendor/github.com/zond/gotomic/stm.go b/vendor/github.com/zond/gotomic/stm.go index a890727f..fd0ecfee 100644 --- a/vendor/github.com/zond/gotomic/stm.go +++ b/vendor/github.com/zond/gotomic/stm.go @@ -1,10 +1,10 @@ package gotomic import ( + "bytes" "fmt" "sort" "sync/atomic" - "bytes" "unsafe" ) @@ -32,7 +32,7 @@ type Handle struct { /* Will point to a version. */ - unsafe.Pointer + Pointer unsafe.Pointer } /* @@ -101,10 +101,10 @@ func (self writes) Less(i, j int) bool { It has a few tweaks that I don't believe break it (but I haven't even tried proving it): - 1) It has an ever increasing counter for the last transaction to commit. + 1) It has an ever increasing counter for the last transaction to commit. - It uses this counter to fail transactions fast when they try to read a value that another - transaction has changed since the first transaction began. + It uses this counter to fail transactions fast when they try to read a value that another + transaction has changed since the first transaction began. 2) It copies the data not only on write opening, but also on read opening. diff --git a/vendor/vendor.json b/vendor/vendor.json index 2ec827ea..d46df79a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -45,10 +45,10 @@ "revisionTime": "2015-11-24T22:32:07Z" }, { - "checksumSHA1": "+o8IunxLKImqyhMUgJ4FCkRIAhA=", + "checksumSHA1": "0JL5ZeTzdHwXRYojBJHC06AnnBs=", "path": "github.com/zond/gotomic", - "revision": "5b217c5578228ff3979c9f9459959176fb54c388", - "revisionTime": "2013-07-06T14:15:31Z" + "revision": "25c7c0a9f89b58b13a08c2bb531363fa117159c2", + "revisionTime": "2016-06-26T07:37:22Z" }, { "checksumSHA1": "9jjO5GjLa0XF/nfWihF02RoH4qc=", -- GitLab